Skip to content

Instantly share code, notes, and snippets.

View My Exiftool Cheatsheet.md
View mdfind commands.md
View rent_receipt.applescript
app = Application("PdfPenPro")
app.includeStandardAdditions = true;
templatePath = Path("/Users/username/Rent Receipt Template.pdf")
savePath = Path("/Users/rjames/apartment")
var getByName = function(fileName){
return app.documents.byName(fileName);
}
View flickrDownloader.py
"""
You can download the flickr API by running
pip install flickrapi
Info here:
http://stuvel.eu/media/flickrapi-docs/documentation/2-calling.html
You'll need to create a Flickr API app here:
View ROT13_iOS_shortcut.js
function getMeta(metaName) {
const metas = document.getElementsByTagName('meta');
for (let i = 0; i < metas.length; i++) {
if (metas[i].getAttribute('property') === metaName) {
return metas[i].getAttribute('content');
}
}
return '';
@rjames86
rjames86 / decode_text.md
Created March 2, 2014 20:29
Actions for Launch Center Pro on iOS
View decode_text.md

Decode text from the clipboard

launch://clipboard/convert?format=urldecode
View get_url_from_safari_tabs.js
Safari = Application('Safari');
Safari.includeStandardAdditions = true;
SystemEvents = Application('System Events')
SystemEvents.includeStandardAdditions = true;
activeAppName = SystemEvents.processes.whose({frontmost:true}).at(0).name();
activeApp = Application(activeAppName);
function run(){
frontWindow = Safari.windows.at(0);
SystemEvents.activate()
View alfred_clipboard_to_csv.sh
sqlite3 -header -csv "$HOME/Library/Application Support/Alfred 3/Databases/clipboard.alfdb" "select item, app from clipboard;" > ~/Desktop/out.csv
View todos_sublime.sh
function ga_code_search() {
# alias todo='ga_code_search "TODO\(`whoami`\)"'
SCREEN_WIDTH=`stty size | awk '{print $2}'`
SCREEN_WIDTH=$((SCREEN_WIDTH-4))
# Given a spooky name so you can alias to whatever you want.
# (cs for codesearch)
# AG is WAY faster but requires a binary
# (try brew install the_silver_searcher)
View todos_emacs.sh
function ga_code_search() {
# alias todo='ga_code_search "TODO\(`whoami`\)"'
SCREEN_WIDTH=`stty size | awk '{print $2}'`
SCREEN_WIDTH=$((SCREEN_WIDTH-4))
# Given a spooky name so you can alias to whatever you want.
# (cs for codesearch)
# AG is WAY faster but requires a binary
# (try brew install the_silver_searcher)