This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bb | |
(require '[babashka.fs :as fs] | |
'[babashka.process :as process]) | |
; Get the final path name | |
(defn get-final-path-name [] | |
(.toString (.getName (fs/cwd) (- (.getNameCount (fs/cwd)) 1)))) | |
; Get the matching group that may have a worktree-type name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p ~/Documents/log/$(date +"%Y")/$(date +"%m") | |
echo "\n\n---\n\n" > ~/Documents/log/$(date +"%Y")/$(date +"%m")/$(date +"%y-%m-%d").txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Example: | |
# | |
# 1. In a terminal window: ./waitforandfollow.sh hello-world | |
# 2. In another terminal window: docker run hello-world | |
if [ "$#" -ne 1 ] ; then | |
echo "$0: exactly 1 argument expected." | |
exit 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find "$1" -type f -iname '*.png' -print0 | while IFS= read -r -d '' file; do | |
echo "crushing $file" | |
pngcrush -rem alla -reduce -brute "$file" temp.png | |
mv -f temp.png "$file" | |
done |