Skip to content

Instantly share code, notes, and snippets.

View nbommakanti's full-sized avatar

Nikhil Bommakanti nbommakanti

View GitHub Profile
@nbommakanti
nbommakanti / keynote.scpt
Created October 19, 2018 13:55 — forked from lambdamusic/keynote.scpt
Apple Keynote: export presenter notes
-- HOWTO:
-- after saving it, open with Script Editor (default) and run it
-- PREREQUISITES:
-- make sure your Keynote presentation is open in the background
-- AFTER EXPORT:
-- if you can't open the file due to encoding errors, open with Sublime (or another a text editor) and then "File / Save with encoding / UTF8"
tell application "Keynote"
@nbommakanti
nbommakanti / useful_bash.sh
Last active January 5, 2017 22:39
A collection of useful commands
## Batch rename files
to_replace="REPLACE ME"
replace_with=""
find . -type f -iname "*PATTERN TO MATCH*" -print0 | while IFS= read -r -d $'\0' file; do
mv "$file" "${file/$to_replace/$replace_with}";
done
# http://stackoverflow.com/questions/15065010/how-to-perform-a-for-each-file-loop-by-using-find-in-shell-bash
# option 2
to_replace="REPLACE ME"