Skip to content

Instantly share code, notes, and snippets.

View ianthekirkland's full-sized avatar

Ian Kirkland ianthekirkland

View GitHub Profile
@ianthekirkland
ianthekirkland / gist:3912595
Created October 18, 2012 15:33 — forked from michaelcpuckett/gist:3912558
brace expansion with mkdir
mkdir -p {test1,test2}/{test3,test4}
gives me test1/test3, test1/test4, test2/test3 and test2/test4
mkdir -p {test1,test2}/{test3,test4/{test5,test6}}
@ianthekirkland
ianthekirkland / snap.sh
Created December 15, 2012 17:27 — forked from anonymous/snap.sh
Apple Store Picture Taker
FILENAME=/Users/apple/Desktop/`date "+%c"`.jpg
#echo $FILENAME
/Users/apple/Downloads/ImageSnap-v0.2.5/imagesnap "$FILENAME"
@ianthekirkland
ianthekirkland / gist:4625644
Created January 24, 2013 17:45 — forked from than/gist:3919174
Simplenote in Menubar
/* -------------------------------------------------
SIMPLENOTE IN YOUR MENUBAR / FLUID.APP USERSTYLES
Than Tibbetts
http://thanland.com/notes/put-simplenote-in-your-menubar-with-fluid
------------------------------------------------- */
.wrapper { top: 20px !important; height: 92%; }
.sidebar { float: left; width: 100% !important; height: 50%; background: none !important; border-right: none !important; border-bottom: 2px solid rgba(0, 0, 0, 0.398438); border-bottom-left-radius: 0 !important; }
tell application "Finder"
get bounds of window of desktop
end tell
--> Result: {0, 0, 1440, 900}
--> Source: http://stackoverflow.com/questions/11488126/get-bounds-of-desktop-with-applescript
@ianthekirkland
ianthekirkland / F_LB-Display POSIX Path in Large Type.applescript
Last active December 12, 2015 05:18
Copies POSIX path of selected Finder item. If multiple items are selected, the script simply uses the first item of the selection. Requires LaunchBar and Growl.
----- F_LB-Display POSIX Path in Large Type -----
tell application "Finder"
set the_selection to the selection
set item_1 to item 1 of the_selection
set current_path to (POSIX path of (item_1 as alias))
set the clipboard to current_path
set heading to "POSIX Path Copied to Clipboard" & return & "——————————————" & return
end tell
@ianthekirkland
ianthekirkland / Terpstra-growlNotif.sh
Created September 1, 2013 15:53
Terpstra-growlNotif.sh
growlnotify -n "Jekyll" -s -t "Jekyll" -m "#{msg}"
@ianthekirkland
ianthekirkland / Terpstra-growlNotifClear.sh
Created September 1, 2013 15:55
Terpstra-growlNotifClear.sh
osascript -e 'tell app id "com.Growl.GrowlHelperApp" to close all notifications'
@ianthekirkland
ianthekirkland / Basic_Web_Login.html
Created November 18, 2013 14:10
Basic JS Web Login
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="en">
<head>
<title>Login</title>
</head>
<body>
<script type="text/javascript">
function CheckPassword() {
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@ianthekirkland
ianthekirkland / XML Attribute Property.applescript
Created March 19, 2014 15:37
Example of XML attribute property
set href_value to value of XML attribute "href" of XML element "foo"