Open in app

Sign in

Write

Sign in

Ray Yuan Liou
Ray Yuan Liou

292 Followers

Home

About

Pinned

Git 冷門技巧集

那些高冷到結凍的神奇指令,我也是看報紙才知道的 — 繼上次分享的整理 commit 技巧以及 worktree 的使用,最近還發現了一些 git 新奇的使用方式。其中一個是關於在 commit 之中寫筆記,這個功能可以為了特定的 commit 留下額外紀錄。 另一個則是方便 Pair Programming 或是幫忙修正程式碼時實用的技巧,git 可以將 Diff 儲存成 patch 檔案。我們可 …

Git

8 min read

Git 冷門技巧集
Git 冷門技巧集
Git

8 min read


Mar 3

Android 13 主題色 Icon 實作與縮小 VectorDrawable 體積的方法

終結圖示強迫症最後一哩路 — Google 在 Android 12 引入了 Material You 設計風格,裏頭有一部分是可以藉由使用者桌布的不同,產生各種不同的個性化系統顏色,這裡頭之中也包含著圖示。 如果你的手機上跑的是 Android 12 以上的版本,在更換桌布時會跳出畫面讓你選擇色盤。而下面有一個選項叫做「圖示套用主題色」,在 Android 12 和 13 …

Android

9 min read

Android 13 主題色 Icon 實作與縮小 VectorDrawable 體積的方法
Android 13 主題色 Icon 實作與縮小 VectorDrawable 體積的方法
Android

9 min read


Sep 21, 2022

Use FFMPEG to optimization video, convert video file to gif in Terminal

Without browsing suspicious websites — FFMPEG is a powerful tool for converting different video files from one format to another. It is usually used in many video-converting websites and software. We can use FFMPEG directly to convert video files or make them smaller. All works run on our local machine without uploading. Prerequisite You need some…

Ffmpeg

3 min read

Use FFMPEG to optimization video, convert video file to gif in Terminal
Use FFMPEG to optimization video, convert video file to gif in Terminal
Ffmpeg

3 min read


May 29, 2022

Galaxy Watch 4 after six months long-tern review

An unfinished product — I bought a Galaxy Watch Classic model in October 2021 with my own money. After being a four-year good time with my previous smartwatch, Gear S3 Frontier, I decided to use a watch trade-in program from Samsung to replace my old one. This review is based on my own experiences…

Wearos

6 min read

Galaxy Watch 4 after six months long-tern review
Galaxy Watch 4 after six months long-tern review
Wearos

6 min read


Apr 28, 2022

Hilt InstallIn ScopeComponent vs Scope Annotation

這兩個 Scope Annotation 到底有什麼不同? — InstallIn(ScopeComponent) 代表這個 Module 從什麼階段被產生,就像我們過去如果手動做 Singleton dependency,我們會把這個 Class 和這個 App 的 Application 生命週期綁在一起。 這邊的 @InstallIn() 代表 Hold 住這些 Dependency Reference 的 Class 什麼時候被產生、被消滅。(並不含 D …

Android

5 min read

Hilt InstallIn ScopeComponent vs Scope Annotation
Hilt InstallIn ScopeComponent vs Scope Annotation
Android

5 min read


Jan 9, 2022

Android 開發環境設定 for Apple Silicon

在 M 系列晶片上快速設定環境 — 最近升級了自己自用了 8 年的 MacBook 電腦 (MacBook Pro 2013 late),做滿兩屆之後今年 Apple 終於推出了全新改版的 MacBook Pro 系列電腦。年底開賣後也入手了一台,不過這次的新機器,Apple 已經從過去 Intel CPU 升級到了自家的 Apple Silicon 系列 SoC。 架構的更換,也代表著 …

Android

5 min read

Android 開發環境設定 for Apple Silicon
Android 開發環境設定 for Apple Silicon
Android

5 min read


Feb 3, 2021

用 LiveData 處理畫面效果與事件

aka. SingleLiveEvent — MVVM (Model-View-ViewModel) 是近來 Android 開發流行的架構,使用觀察者模式在 Presentation 層和 View 溝通。 有幾種作法可以達到效果: 透過 RxJava Subject 透過 LiveData (也是官方推薦的作法) 手作觀察者模式 ( OnClickListener也是一種觀察者模式作法) 這裡討論的是官方建議的 LiveData 實作方式,View 去 observe ViewModel 暴露的 LiveData,根據不同的畫面狀態 (ViewState) 進行畫面處理。 LiveData 的好處是幫忙處理了 Android Context 生命週期的應對,交給他做不必煩惱。除了避免了忘記處理 Reference 造成的 Memory Leak,也不會發生 Activity 在 backStack 中接受到訊號回魂的奇異事件 …

Android App Development

4 min read

用 LiveData 處理畫面效果與事件
用 LiveData 處理畫面效果與事件
Android App Development

4 min read


May 31, 2020

[CLI] git 整理 commit 的技巧,讓你輕鬆拆分或合併節點

宛如一位 commit 風格師 — 最近工作上學到一些整理 git commit 的技巧,大部分圍繞在 git rebase 的功能使用。透過這些方法整理出易懂的程式開發過程,也方便 code review 的人或是未來的自己了解這一段時間的所作所為。 有鑑於每個人或團隊適合消化的 commit 數量不同,必須跟著需求調整。最常見的整理不外呼是:將一個過大的 commit 切細、將過 …

Git

8 min read

[CLI] git 整理 commit 的技巧,讓你輕鬆拆分或合併節點
[CLI] git 整理 commit 的技巧,讓你輕鬆拆分或合併節點
Git

8 min read


May 24, 2020

在 Google 文件顯示程式碼的技巧

如何順眼的呈現程式碼增添幸福感 — 在眾多資料整理的解決方案中,Google 文件是當中很受歡迎的選項。 除了近似於 Word 的編輯界面,文件處理功能也很豐富強大。 資訊相關從業人員在整理文件時,有時會需要當程式碼附在其中,無奈的是 Google 文件沒有做相關調整,實在稱不上適合顯示程式碼的平台。 最近我也遇到類似的狀況,研究了一番後,發現可以透過幾個簡單技巧改善 Google 文件的程式碼顯示,主要分為兩個部份: 使用外掛程式改善語法高亮及排版 改用更適合程式碼顯示的字體 使用 Code Blocks 外掛程式 安裝外掛程式 從 Google 文件的功能選擇「外掛程式」 ->「取得外掛程式」

Lifehacks

3 min read

Google 文件顯示程式碼的技巧
Google 文件顯示程式碼的技巧
Lifehacks

3 min read


Aug 22, 2019

3 步驟輸出 Android 專案的多國語言字串成試算表

直接擁有一個昨天就應該內建在 IDE 裡頭的功能 — 在 Android 專案處理多國語系只要遵循 strings.xml 語言設定,基本上都能快速無痛的搭建起來。 Android Studio 在 2.X 時期新增了 Translations Editor,方便開發者在一個分頁之中,全攬所有的語言設定,處理起多語言更加地有效率。 Translations Editor 提供一個類似於試算表軟體的介 …

Android

4 min read

3 步驟輸出 Android 專案的多國語言字串成試算表
3 步驟輸出 Android 專案的多國語言字串成試算表
Android

4 min read

Ray Yuan Liou

Ray Yuan Liou

292 Followers

software dev

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams