rcaldous / gen-thumb.sh
0 likes
0 forks
1 files
Last active
Generate a set of thumbnails for a given video file using vcs https://p.outlyer.net/vcs
1 | vcs videofile.mp4 -o thumbs.jpg -n100 -c4 -H160 |
rcaldous / docker compose aliases
0 likes
0 forks
1 files
Last active
1 | alias dcpull='docker compose pull' |
2 | alias dcupd='docker compose up -d' |
3 | alias dcdown='docker compose down' |
4 | alias dcuro='docker compose up -d --remove-orphans' |
5 | alias dcure='docker compose up -d --force-recreate' |
rcaldous / Zip All sub folders (no compression)
0 likes
0 forks
1 files
Last active
1 | for i in */; do zip -r0 "${i%/}.zip" "$i"; done |
rcaldous / Git sub git actions (bulk actions)
0 likes
0 forks
1 files
Last active
1 | alias gfs="find . -maxdepth 1 -mindepth 1 -type d -exec sh -c '(echo {} && cd {} && git status -s && echo)' \;" |
2 | alias gfp='ls | xargs -P10 -I{} git -C {} pull' |
rcaldous / Clear Bash history
0 likes
0 forks
1 files
Last active
Don't want to be tempted to up arrow?
1 | cat /dev/null > ~/.bash_history && history -c && exit |
rcaldous / Create Folders from txt list
0 likes
0 forks
1 files
Last active
1 | xargs -d '\n' mkdir -p -- < folder_list.txt |
rcaldous / Generate Colour Scheme
0 likes
0 forks
1 files
Last active
1 | convert image.png -geometry 16x16 -colors 8 -unique-colors -scale 16000% scheme.png |
rcaldous / RecordList Interface for Kotlin
0 likes
0 forks
1 files
Last active
1 | interface RecordList { |
2 | fun toRecordList(): MutableList<List<String>> |
3 | fun toMinimalRecordList(): MutableList<List<String>> |
4 | |
5 | val name: String |
6 | val header: List<String> |
7 | val headerMin: List<String> |
8 | } |
rcaldous / Enum from String - Kotlin
0 likes
0 forks
1 files
Last active
1 | // https://stackoverflow.com/questions/28548015/how-do-i-create-an-enum-from-a-string-in-kotlin |
2 | inline fun <reified T : Enum<T>> valueOf(type: String): T? { |
3 | return try { |
4 | java.lang.Enum.valueOf(T::class.java, type) |
5 | } catch (e: Exception) { |
6 | null |
7 | } |
8 | } |
Newer
Older