edge 瀏覽器更新後變黃
疑似只在特定螢幕上才會出現,有些螢幕的色彩設定選擇錯誤導致的bug
chrome目前已經修好了,剩下edge還沒好,不過edge可以從設定改好
進入下面的連結
edge://flags/#force-color-profile
把 Force color profile 改成 sRGB 重啟就可以修好了
本站建議搭配 Hover Zoom+ chrome 擴充套件,可自動放大圖片
( 站內文介紹: https://goo.gl/BnBSGa )
網站搜索不是很好用建議使用google底下括號內是範例,整串打進google搜索內;
[ site:https://charlottehong.blogspot.tw/ 你要搜索的內容 ]
疑似只在特定螢幕上才會出現,有些螢幕的色彩設定選擇錯誤導致的bug
chrome目前已經修好了,剩下edge還沒好,不過edge可以從設定改好
進入下面的連結
edge://flags/#force-color-profile
把 Force color profile 改成 sRGB 重啟就可以修好了
Stripe 官方命令列工具,可在終端機操作 Stripe API、把 webhook 轉發到本機測試,這邊自動抓 GitHub 上的最新版本安裝
兩個選項擇一,整段貼到 PowerShell 執行
C:\App\stripe-cli(系統變數)以系統管理員身分執行
先確認權限,沒有顯示錯誤再往下
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { throw "請以系統管理員身分執行 PowerShell" }
下載並安裝
# 設定安裝目錄
$StripeDir = "C:\App\stripe-cli"
# 取得最新版本資訊
$Release = Invoke-RestMethod https://api.github.com/repos/stripe/stripe-cli/releases/latest
$Asset = $Release.assets | Where-Object name -like "*_windows_x86_64.zip"
# 下載 stripe
$Zip = "$env:TEMP\stripe.zip"
Invoke-WebRequest -Uri $Asset.browser_download_url -OutFile $Zip
# 驗證檔案
if ((Get-FileHash $Zip -Algorithm SHA256).Hash -ne ($Asset.digest -replace "^sha256:")) { throw "SHA256 不符" }
# 解壓縮到安裝目錄(覆蓋舊版)
Expand-Archive $Zip $StripeDir -Force
Remove-Item $Zip
# 加入系統環境變數
$MachinePath = [Environment]::GetEnvironmentVariable("Path", "Machine")
if (($MachinePath -split ";") -notcontains $StripeDir) {
[Environment]::SetEnvironmentVariable("Path", "$MachinePath;$StripeDir", "Machine")
}
C:\Users\<你>\.local\bin(使用者變數)一般權限即可
# 設定安裝目錄
$StripeDir = "$env:USERPROFILE\.local\bin"
# 取得最新版本資訊
$Release = Invoke-RestMethod https://api.github.com/repos/stripe/stripe-cli/releases/latest
$Asset = $Release.assets | Where-Object name -like "*_windows_x86_64.zip"
# 下載 stripe
$Zip = "$env:TEMP\stripe.zip"
Invoke-WebRequest -Uri $Asset.browser_download_url -OutFile $Zip
# 驗證檔案
if ((Get-FileHash $Zip -Algorithm SHA256).Hash -ne ($Asset.digest -replace "^sha256:")) { throw "SHA256 不符" }
# 解壓縮到安裝目錄(覆蓋舊版)
Expand-Archive $Zip $StripeDir -Force
Remove-Item $Zip
# 加入使用者環境變數
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (($UserPath -split ";") -notcontains $StripeDir) {
[Environment]::SetEnvironmentVariable("Path", "$UserPath;$StripeDir", "User")
}
裝完接著執行,重新載入環境變數並顯示安裝位置
# 重新載入環境變數
$env:Path = (($env:Path -split ";") + ([Environment]::GetEnvironmentVariable("Path", "Machine") -split ";") + ([Environment]::GetEnvironmentVariable("Path", "User") -split ";") | Where-Object { $_ } | Select-Object -Unique) -join ";"
# 顯示安裝位置
Write-Host "stripe 位置:$((Get-Command stripe).Source)"
確認版本
stripe --version
登入 Stripe(瀏覽器會開啟 Dashboard,確認畫面上的配對碼和終端機一致,可一次勾選多個帳號、沙盒或正式環境,再按審核)
stripe login
已登入時再跑一次 stripe login,按 Enter 開啟瀏覽器,可以授權更多帳號、沙盒或正式環境(live)
Stripe 新版建議測試只用沙盒就好,授權時不要勾選沙盒底下的「測試模式」,那是舊式的測試環境
列出已授權的帳號,active 是目前使用中的
stripe whoami --format json | ConvertFrom-Json -PipelineVariable me |
ForEach-Object authorized_accounts |
Select-Object name, id,
@{ n = "modes"; e = { $_.modes -join ", " } },
@{ n = "status"; e = { if ($_.id -eq $me.account_id) { "active" } } }
重跑選項 A 或 B 即可,會抓最新版覆蓋
自動抓 Gradle 官方最新版本安裝,之後重跑同一段就是更新
兩個選項擇一,整段貼到 PowerShell 執行
需要 Java 17 以上,沒有的話先看 Java 安裝教學
java -version
C:\App\gradle(系統變數)以系統管理員身分執行
先確認權限,沒有顯示錯誤再往下
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { throw "請以系統管理員身分執行 PowerShell" }
下載並安裝
# 設定安裝目錄
$GradleRoot = "C:\App\gradle"
# 取得最新版本資訊
$Latest = Invoke-RestMethod https://services.gradle.org/versions/current
$GradleDir = "$GradleRoot\gradle-$($Latest.version)"
# 下載 gradle
$Zip = "$env:TEMP\gradle.zip"
Invoke-WebRequest -Uri $Latest.downloadUrl -OutFile $Zip
# 驗證檔案
if ((Get-FileHash $Zip -Algorithm SHA256).Hash -ne (Invoke-RestMethod $Latest.checksumUrl).Trim()) { throw "SHA256 不符" }
# 解壓縮(產生帶版本號的資料夾)
Expand-Archive $Zip $GradleRoot -Force
Remove-Item $Zip
# 更新系統環境變數(移除舊版,加入新版)
$MachinePath = (@([Environment]::GetEnvironmentVariable("Path", "Machine") -split ";" | Where-Object { $_ -and $_ -notlike "$GradleRoot\*" }) + "$GradleDir\bin") -join ";"
[Environment]::SetEnvironmentVariable("Path", $MachinePath, "Machine")
C:\Users\<你>\.local\gradle(使用者變數)一般權限即可
# 設定安裝目錄
$GradleRoot = "$env:USERPROFILE\.local\gradle"
# 取得最新版本資訊
$Latest = Invoke-RestMethod https://services.gradle.org/versions/current
$GradleDir = "$GradleRoot\gradle-$($Latest.version)"
# 下載 gradle
$Zip = "$env:TEMP\gradle.zip"
Invoke-WebRequest -Uri $Latest.downloadUrl -OutFile $Zip
# 驗證檔案
if ((Get-FileHash $Zip -Algorithm SHA256).Hash -ne (Invoke-RestMethod $Latest.checksumUrl).Trim()) { throw "SHA256 不符" }
# 解壓縮(產生帶版本號的資料夾)
Expand-Archive $Zip $GradleRoot -Force
Remove-Item $Zip
# 更新使用者環境變數(移除舊版,加入新版)
$UserPath = (@([Environment]::GetEnvironmentVariable("Path", "User") -split ";" | Where-Object { $_ -and $_ -notlike "$GradleRoot\*" }) + "$GradleDir\bin") -join ";"
[Environment]::SetEnvironmentVariable("Path", $UserPath, "User")
裝完接著執行,重新載入環境變數並顯示安裝位置
# 重新載入環境變數
$env:Path = (($env:Path -split ";") + ([Environment]::GetEnvironmentVariable("Path", "Machine") -split ";") + ([Environment]::GetEnvironmentVariable("Path", "User") -split ";") | Where-Object { $_ } | Select-Object -Unique) -join ";"
# 顯示安裝位置
Write-Host "gradle 位置:$((Get-Command gradle).Source)"
確認版本
gradle --version
看到 Gradle x.y.z 和 Java 版本即成功
重跑選項 A 或 B 即可,新版會裝到新的版本資料夾,環境變數會移除舊版並換成新版
舊版資料夾會保留,確認新版沒問題後可手動刪除
Eclipse Temurin 是 Adoptium 發行的免費 OpenJDK,也是 Oracle 以外最多人用的 Java
以下腳本都會自動抓最新 LTS 版本並驗證檔案,三種方式擇一,整段貼到 PowerShell 執行
開啟安裝畫面自己點下一步,PATH 會自動設好,需要 JAVA_HOME 時勾選「Set JAVA_HOME variable」
# 取得最新 LTS 版本資訊
$Lts = (Invoke-RestMethod https://api.adoptium.net/v3/info/available_releases).most_recent_lts
$Pkg = (Invoke-RestMethod "https://api.adoptium.net/v3/assets/latest/$Lts/hotspot?architecture=x64&image_type=jdk&os=windows&vendor=eclipse")[0]
# 下載 MSI
$Msi = "$env:TEMP\temurin.msi"
Invoke-WebRequest -Uri $Pkg.binary.installer.link -OutFile $Msi
# 驗證檔案
if ((Get-FileHash $Msi -Algorithm SHA256).Hash -ne $Pkg.binary.installer.checksum) { throw "SHA256 不符" }
# 開啟安裝畫面
Start-Process $Msi -Wait
Remove-Item $Msi
以系統管理員身分執行,裝到預設位置,含 PATH、JAVA_HOME、.jar 關聯
# 取得最新 LTS 版本資訊
$Lts = (Invoke-RestMethod https://api.adoptium.net/v3/info/available_releases).most_recent_lts
$Pkg = (Invoke-RestMethod "https://api.adoptium.net/v3/assets/latest/$Lts/hotspot?architecture=x64&image_type=jdk&os=windows&vendor=eclipse")[0]
# 下載 MSI
$Msi = "$env:TEMP\temurin.msi"
Invoke-WebRequest -Uri $Pkg.binary.installer.link -OutFile $Msi
# 驗證檔案
if ((Get-FileHash $Msi -Algorithm SHA256).Hash -ne $Pkg.binary.installer.checksum) { throw "SHA256 不符" }
靜默安裝
# 讀取 MSI 內建的預設安裝位置
$Db = (New-Object -ComObject WindowsInstaller.Installer).OpenDatabase($Msi, 0)
function Get-MsiDir($Id) { $v = $Db.OpenView("SELECT ``DefaultDir`` FROM ``Directory`` WHERE ``Directory``='$Id'"); [void]$v.Execute(); ($v.Fetch().StringData(1) -split "\|")[-1] }
$InstallDir = "$env:ProgramFiles\$(Get-MsiDir PRODUCTMANUFACTURER)\$(Get-MsiDir INSTALLDIR)"
$Db = $null; [GC]::Collect(); [GC]::WaitForPendingFinalizers()
# 安裝
Start-Process msiexec -Wait -ArgumentList "/i `"$Msi`" ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome INSTALLDIR=`"$InstallDir`" /quiet"
Remove-Item $Msi
一般權限即可,裝到 C:\Users\<你>\.local\java
# 設定安裝目錄
$JavaDir = "$env:USERPROFILE\.local\java"
# 取得最新 LTS 版本資訊
$Lts = (Invoke-RestMethod https://api.adoptium.net/v3/info/available_releases).most_recent_lts
$Pkg = (Invoke-RestMethod "https://api.adoptium.net/v3/assets/latest/$Lts/hotspot?architecture=x64&image_type=jdk&os=windows&vendor=eclipse")[0]
# 下載 zip
$Zip = "$env:TEMP\temurin.zip"
Invoke-WebRequest -Uri $Pkg.binary.package.link -OutFile $Zip
# 驗證檔案
if ((Get-FileHash $Zip -Algorithm SHA256).Hash -ne $Pkg.binary.package.checksum) { throw "SHA256 不符" }
解壓縮並設定環境變數
# 解壓縮到安裝目錄(覆蓋舊版)
Expand-Archive $Zip $env:TEMP -Force
if (Test-Path $JavaDir) { Remove-Item $JavaDir -Recurse -Force }
Move-Item "$env:TEMP\$($Pkg.release_name)" $JavaDir
Remove-Item $Zip
# 設定 JAVA_HOME
[Environment]::SetEnvironmentVariable("JAVA_HOME", $JavaDir, "User")
# 加入使用者環境變數
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (($UserPath -split ";") -notcontains "$JavaDir\bin") {
[Environment]::SetEnvironmentVariable("Path", "$UserPath;$JavaDir\bin", "User")
}
裝完接著執行,重新載入環境變數並顯示安裝位置
# 重新載入環境變數
$env:Path = (($env:Path -split ";") + ([Environment]::GetEnvironmentVariable("Path", "Machine") -split ";") + ([Environment]::GetEnvironmentVariable("Path", "User") -split ";") | Where-Object { $_ } | Select-Object -Unique) -join ";"
foreach ($Scope in "Machine", "User") { $v = [Environment]::GetEnvironmentVariable("JAVA_HOME", $Scope); if ($v) { $env:JAVA_HOME = $v } }
# 顯示安裝位置
Write-Host "java 位置:$((Get-Command java).Source)"
Write-Host "JAVA_HOME:$env:JAVA_HOME"
確認版本
java -version
看到 Temurin-xx 的版本即成功
已裝過其他 Java 時,系統 PATH 會排在使用者 PATH 前面,選項 C 可能被舊版蓋過,先到「設定 > 應用程式」移除舊版
雖然 Github 上的 issue 已經有基本60分功能,但真的要協作用 jira 當 agent 們的共同記憶區會比較變些,這邊是 Windows 快速安裝的方法
兩個選項擇一,整段貼到 PowerShell 執行
C:\App\atlassian-cli(系統變數)以系統管理員身分執行
# 設定安裝目錄
$AcliDir = "C:\App\atlassian-cli"
# 建立目錄
New-Item -ItemType Directory -Force $AcliDir | Out-Null
# 下載 acli
Invoke-WebRequest -Uri "https://acli.atlassian.com/windows/latest/acli_windows_amd64/acli.exe" -OutFile "$AcliDir\acli.exe"
# 加入系統環境變數
$MachinePath = [Environment]::GetEnvironmentVariable("Path", "Machine")
if (($MachinePath -split ";") -notcontains $AcliDir) {
[Environment]::SetEnvironmentVariable("Path", "$MachinePath;$AcliDir", "Machine")
}
C:\Users\<你>\.local\bin(使用者變數)一般權限即可
# 設定安裝目錄
$AcliDir = "$env:USERPROFILE\.local\bin"
# 建立目錄
New-Item -ItemType Directory -Force $AcliDir | Out-Null
# 下載 acli
Invoke-WebRequest -Uri "https://acli.atlassian.com/windows/latest/acli_windows_amd64/acli.exe" -OutFile "$AcliDir\acli.exe"
# 加入使用者環境變數
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
if (($UserPath -split ";") -notcontains $AcliDir) {
[Environment]::SetEnvironmentVariable("Path", "$UserPath;$AcliDir", "User")
}
確認安裝
# 重新載入環境變數
$env:Path = (($env:Path -split ";") + ([Environment]::GetEnvironmentVariable("Path", "Machine") -split ";") + ([Environment]::GetEnvironmentVariable("Path", "User") -split ";") | Where-Object { $_ } | Select-Object -Unique) -join ";"
# 顯示安裝位置
Write-Host "acli 位置:$((Get-Command acli).Source)"
確認版本
acli --version
登入 Jira (瀏覽器授權後,回終端機選站台才算完成)
acli jira auth login --web
登入 Confluence(需要時)
acli confluence auth login --web
查看登入狀態
acli jira auth status
列出專案
acli jira project list --limit 10
看到 ✓ Authenticated,且列專案沒有報錯即成功(還沒有專案時清單是空的)