Skip to content

Commit

Permalink
Add new cheats (#136)
Browse files Browse the repository at this point in the history
- [x] json/yaml
- [x] osx wallpaper
  • Loading branch information
denisidoro authored Oct 23, 2019
1 parent fdf5bf4 commit 51bc30e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cheats/misc.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,13 @@ curl -s "wttr.in/<location>" \
% qr code

# Create a QR code with some content
echo <content> | curl -F-=\<- qrenco.de
echo <content> | curl -F-=\<- qrenco.de



% json

# convert JSON to YAML
cat <json_file> | ruby -ryaml -rjson -e 'puts YAML.dump(JSON.load(ARGF))'

$ json_file: find . -name '*.json'
5 changes: 5 additions & 0 deletions cheats/osx.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ defaults write com.apple.finder CreateDesktop -bool true; \
# Hide items in desktop
defaults write com.apple.finder CreateDesktop -bool false; \
killall Finder

# Set wallpaper
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "<image_path>"'

$ image_path: find $HOME -maxdepth 3 -name "*.jpg" -o -name "*.jpeg" -o -name "*.png"

0 comments on commit 51bc30e

Please sign in to comment.