發表文章

解決Firebase整合Next.js部屬(deploy)的permission問題

圖片
  這是在轉移之前寫的next.js功能到其他firebase專案時發生的權限問題 摘要錯誤訊息如下: i  functions: creating Node.js 18 (2nd Gen) function firebase-frameworks-***:ssr***(asia-east1)...     Unable to retrieve the repository metadata for projects/ *** /locations/asia-east1/repositories/gcf-artifacts. Ensure that the Cloud Functions service account has 'artifactregistry.repositories.list' and 'artifactregistry.repositories.get' permissions. You can add the permissions by granting the role 'roles/artifactregistry.reader'.     Functions deploy had errors with the following functions:             firebase-frameworks- *** :ssr***(asia-east1) 

解決ffmpeg轉檔遭遇error: libx264 width not divisible by 2

圖片
解決ffmpeg轉檔遭遇錯誤 [libx264 @ 0x6a371c0] width not divisible by 2 (861x909) [vost#0:0/libx264 @ 0x6a36dc0] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!

使用docker compose建置(build)hugo靜態網站

圖片
Hugo是一套以golang語言撰寫可快速建置靜態網站的框架,官方副標如下: The world’s fastest framework for building websites Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. 而近期幫忙建置 中華易經天書三式協會網站 https://ichingtrilogy.com 即使用hugo來完成。 使用hugo建置網站的主程式需要使用golang,所需版本與我本機環境golang會有衝突,就有必要透過container來跑另一個版本golang來建置網站。而compose又提供一個簡單指令docker compose up就能完成

停止Ubuntu使用apt upgrade升級至最新LTS版本

圖片
停止Ubuntu使用apt upgrade升級至最新LTS版本 使用情境: 因為開發的軟體需要驗證測試環境所以要保持舊版LTS,所以才會有使用舊版的Ubuntu但是不想升級LTS版本這情境,例如14.04 升級到 16.04、16.04 升級到 18.04、18.04升級到 20.04或是20.04升級到22.04。

新增 Github Action 測試 SSH到 Linode

圖片
新增 Github Action 測試 SSH到 Linode 使用情境: 在變更Linode登入帳號與設定後,但是整個流程編譯會很花時間,可以這篇提供的script來確認變更後的資訊可以連線正常。

Ubuntu 22.04 LTS 格式化成exFAT格式

圖片
使用Ubuntu 16.04/18.04 LTS時安裝的套件是exfat-utils sudo apt install exfat-fuse exfat-utils 但是在Ubuntu 22.04 LTS中安裝該套件會出現下圖錯誤訊息 無法取得套件exfat-utils,但它卻被其他套件引用了。 這意味著這格套件可以經消失了、被廢棄了,或是只能由其他的來源取得

在Ubuntu中建立Android Studio左列圖示

圖片
  Tools > Create Desktop Entry

中文轉換成漢語拼音(無音調)

使用指令將中文轉換成漢語拼音(無音調) 使用教育部的中文譯音轉換系統查詢漢語拼音

可換位置的列表 - VanillaJs

圖片