Skip to content

Instantly share code, notes, and snippets.

@tjluoma
tjluoma / reset-safari.sh
Created February 23, 2012 16:35
this will delete all of Safari's cookies, local storage (including website previews) and database files.
#!/bin/sh
# LogoutHooks run as root, which is why you have to
# use logname to make sure you are cleaning out the right files
cd ~`/usr/bin/logname` &&
/bin/rm -rf \
Library/Cookies/Cookies.binarycookies \
Library/Caches/com.apple.Safari/* \
Library/Safari/LocalStorage/* \
Library/Safari/Databases/*
@tjluoma
tjluoma / simplepastie.plain_text
Created March 1, 2012 05:35
this is metadata description
This is a test of
SimplePastie
<http://itunes.apple.com/us/app/simplepastie/id402351865?mt=12>
SimplePastie allows you to paste your clipboard to various sites pasteboards including, pastie.org and gist.github.com using a global hotkey.
free
@tjluoma
tjluoma / environment.plist
Created March 6, 2012 22:16
My ~/.MacOSX/environment.plist file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/Users/luomat/Dropbox/bin:/usr/local/sbin:/usr/local/bin:/bin:/sbin:/usr/sbin:/usr/bin</string>
</dict>
</plist>
@tjluoma
tjluoma / gist:2136080
Created March 20, 2012 14:19
brew install par2
==> Downloading http://downloads.sourceforge.net/project/parchive/par2cmdline/0.4/par2cmdline-0.4.tar.gz
Already downloaded: /Users/luomat/Library/Caches/Homebrew/par2-0.4.tar.gz
==> Downloading patches
==> Patching
patching file reedsolomon.cpp
==> ./configure --disable-debug --prefix=/usr/local/Cellar/par2/0.4
==> make install
==> Build Environment
CPU: dual-core 64-bit penryn
@tjluoma
tjluoma / com.apple.Boot.plist
Created April 2, 2012 19:46
Enable the "Apple MacBook Air SuperDrive" on any Mac
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel Flags</key>
<string>mbasd=1</string>
</dict>
</plist>
@tjluoma
tjluoma / com.tjluoma.launch-omnifocus.plist
Created May 6, 2012 05:51
Launch OmniFocus every 90 minutes
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.tjluoma.launch-omnifocus</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>-g</string>
@tjluoma
tjluoma / com.tjluoma.omnifocus-reminder.plist
Created May 6, 2012 06:35
Growl reminder to check OmniFocus every 60 minutes
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.tjluoma.omnifocus-reminder</string>
<key>ProgramArguments</key>
<array>
<string>growlnotify</string>
@tjluoma
tjluoma / com.tjluoma.omnifocus-morning-checkin.plist
Created May 6, 2012 07:18
At 9:30am, launch OmniFocus and make it the active app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.tjluoma.omnifocus-morning</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>-a</string>
@tjluoma
tjluoma / com.tjluoma.keeprunning-growl.plist
Created July 9, 2012 15:10
a launchd plist to launch Growl on login and keep it running unless it is manually quit.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
@tjluoma
tjluoma / send2instapaper.sh
Created July 19, 2012 22:12
Shell script which takes one argument (an URL) and attempts to add it to your Instapaper account using the official API
#!/bin/zsh
# add URL to instapaper
INSTAPAPER_USERNAME=you@example.com
# if you have one
INSTAPAPER_PASSWORD='seKret'
#
# You shouldn't need to edit anything below here