pbpaste
and pbcopy
defaults write com.apple.finder CreateDesktop 0
killall Finder # restarting Finder is required
defaults write com.apple.finder CreateDesktop 1
killall Finder # restarting Finder is required
convenient bash alias for this which lets me simply toggle the desktop on and off Here is a gist: https://gist.github.com/berndverst/6f58c0d6aedddb6c06c23e57d...
toggledesktop () {
if [[ $(defaults read com.apple.finder CreateDesktop) -eq "0" ]]
then
export SHOWDESKTOP=1;
echo "Unhiding Desktop icons"
else
export SHOWDESKTOP=0;
echo "Hiding Desktop icons"
fi
defaults write com.apple.finder CreateDesktop $SHOWDESKTOP
killall Finder
}
Pipe in and out of $EDITOR.
json_pp
git config --global user.email "email@domain"
git config --global user.name "Name"
git config --global credential.helper store
Add --format=posix
when creating the file, e.g.:
tar --format=posix -z -v -c -f ~/json.tgz path/*.json
find . -maxdepth 1 -iname 'file*' -mtime -1 | sort | tar cvfz tarfile.tgz -T -
tar -cvfz foo.tgz -C /dir/to/cd/into sub/path/with/files
ls -1 *.ipynb| xargs -I "{}" gsutil cp "{}" "gs://<BUCKET_NAME>/$HOSTNAME/$(date -I)/{}"
iconv -f iso-8859-1 -t utf-8 input_file -o ouput_file
cat -n
sed '1s/^\xEF\xBB\xBF//'
Make a video from a pic and an mp3
ffmpeg -loop 1 -i image.png -i song.mp3 -c:v libx264 -pix_fmt yuv420p -t 55 -vf subtitles=subtitles.srt output_movie.mp4
apt install software-properties-common