例文を組み込んだAlfred Workflowを作りました: Alfred Git Commit Message Example
以下転載:
| cat <(printf "\xEF\xBB\xBF") 元のUTF-8ファイル.txt > BOM付きUTF-8ファイル.txt |
以下転載:
| import Cocoa | |
| // 標準入力で入力した行全体を取得、スペース区切りにして配列で返す | |
| // String型の入力 | |
| func stdinStr(array:String?)->[String]{ | |
| let str: String = array! | |
| let array = str.components(separatedBy:" ")//ここの" "を変更すると区切るワードを変えられる | |
| return array | |
| } |
| 更新: | 2021-05-23 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2021.1 |
| URL: | https://voluntas.github.io/ |
| import { useRef } from 'react'; | |
| let uniqueId = 0; | |
| const getUniqueId = () => uniqueId++; | |
| export function useComponentId() { | |
| const idRef = useRef(getUniqueId()); | |
| return idRef.current; | |
| } |