From 51bc30e9631c66d83f29210fb56fa4c40e583292 Mon Sep 17 00:00:00 2001 From: Denis Isidoro Date: Wed, 23 Oct 2019 18:11:48 -0300 Subject: [PATCH] Add new cheats (#136) - [x] json/yaml - [x] osx wallpaper --- cheats/misc.cheat | 11 ++++++++++- cheats/osx.cheat | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cheats/misc.cheat b/cheats/misc.cheat index b756c83..756d821 100644 --- a/cheats/misc.cheat +++ b/cheats/misc.cheat @@ -15,4 +15,13 @@ curl -s "wttr.in/" \ % qr code # Create a QR code with some content -echo | curl -F-=\<- qrenco.de \ No newline at end of file +echo | curl -F-=\<- qrenco.de + + + +% json + +# convert JSON to YAML +cat | ruby -ryaml -rjson -e 'puts YAML.dump(JSON.load(ARGF))' + +$ json_file: find . -name '*.json' diff --git a/cheats/osx.cheat b/cheats/osx.cheat index 5c374c3..8be5d44 100644 --- a/cheats/osx.cheat +++ b/cheats/osx.cheat @@ -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: find $HOME -maxdepth 3 -name "*.jpg" -o -name "*.jpeg" -o -name "*.png"