Skip to content

Instantly share code, notes, and snippets.

@tjluoma
tjluoma / evening-edition.sh
Created July 19, 2012 22:13
Shell script to send all evening-edition.com URLs to Instapaper
#!/bin/zsh
#
# see https://gist.github.com/3147226 for send2instapaper.sh
lynx -listonly -dump -width=1024 -nomargins -nonumbers 'http://evening-edition.com/' |\
egrep -vi 'http://evening-edition.com/|https://twitter.com/|http://twitter.com/|\.org\.uk/$|\.com/$' |\
egrep '^http' |\
while read line
do
@tjluoma
tjluoma / com.tjluoma.evening-edition-to-instapaper.plist
Created July 19, 2012 22:22
Run a shell script every day at 8:05 pm
<?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>AbandonProcessGroup</key>
<true/>
<key>Label</key>
<string>com.tjluoma.evening-edition-to-instapaper</string>
<key>ProgramArguments</key>
<array>
#!/bin/zsh
#
# Author: Timothy J. Luoma
# Email: luomat at gmail dot com
# Date: 2011-03-24
#
# Purpose: Find conflicted copies in Dropbox
NAME=`echo $0:t`
ioreg -lw0 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd -p -r | strings -6
@tjluoma
tjluoma / com.tjluoma.keeprunning-growl.plist
Created August 15, 2012 17:07
This .plist will keep Growl running all of the time EXCEPT if the user tells it to 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 / batteryinfo.sh
Created August 19, 2012 22:04
This will limit the output of 'system_profiler' to the information AFTER 'Battery Information' and BEFORE 'System Power Settings'
/usr/sbin/system_profiler |\
sed '1,/Battery Information/d ; /System Power Settings/,$d'
@tjluoma
tjluoma / com.tjluoma.on_networkchange.plist
Created August 22, 2012 21:07
run a shell script whenever a Mac's network information changes
<?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>AbandonProcessGroup</key>
<true/>
<key>Label</key>
<string>com.tjluoma.on_networkchange</string>
<key>ProgramArguments</key>
<array>
@tjluoma
tjluoma / urlencode-sed.txt
Created September 11, 2012 05:29
This is a file meant to be used with 'sed' for url-encoding strings.
s:%:%25:g
s: :%20:g
s:<:%3C:g
s:>:%3E:g
s:#:%23:g
s:{:%7B:g
s:}:%7D:g
s:|:%7C:g
s:\\:%5C:g
s:\^:%5E:g
@tjluoma
tjluoma / URLs for iOS 6 Firmware.txt
Created September 19, 2012 14:44
URLs for iOS 6 Firmware
# I'm not sure which of these go to which model, but here they are
# iPhone
http://appldnld.apple.com/iOS6/Restore/041-7169.20120919.5Mial/iPhone5,1_6.0_10A405_Restore.ipsw
http://appldnld.apple.com/iOS6/Restore/041-7171.20120919.doJ1e/iPhone5,2_6.0_10A405_Restore.ipsw
http://appldnld.apple.com/iOS6/Restore/041-7181.20120919.lEuOK/iPhone4,1_6.0_10A403_Restore.ipsw
http://appldnld.apple.com/iOS6/Restore/041-7175.20120919.wvv7Y/iPhone3,1_6.0_10A403_Restore.ipsw
@tjluoma
tjluoma / skitch-edits.html
Created September 21, 2012 13:10
Skitch 1.0.7 and preventing the Mac App Store from prompting you to upgrade to 2.0
<h1>
Stop the App Store upgrade prompt</h1>
<p>
Fortunately I saved my copy of Skitch (version 1.0.12) after hearing <a href="http://twitter.com/danielpunkass">Daniel Jalkut</a> (developer at <a href="http://www.red-sweater.com/">Red Sweater Software</a> best known for <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a> and <a href="http://www.red-sweater.com/fastscripts/">FastScripts</a>) mention that a brief stint with Skitch 2.0 had sent him back to Skitch version 1.</p>
<p>
The only problem is that the Mac App Store app kept telling me that Skitch needs to be updated. I even went into my Purchases list and '&quot;hid&quot; Skitch, but still the App Store kept telling me that it wanted to update Skitch.</p>
<p>
I seem to have found a solution, which was to quit Skitch.app, and then locate the app in /Applications/ using the Finder. Once there, I control-clicked on the app and chose &quot;Show Package Contents&quot;:</p>
<p style="text-align:center">
<img alt="" border="0" height="143" src="htt