This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# | |
# itunes.sh - Control Your iTunes from shell | |
# | |
TRACK_PROGRAM=`cat <<EOS | |
tell current track | |
name & " - " & artist | |
end tell | |
EOS` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Coda Light | |
-- | |
-- By Henrik Nyh <http://henrik.nyh.se>, 2007-04-26 | |
-- His original script: http://henrik.nyh.se/2007/04/coda-light-applescript | |
-- | |
-- Changes for Transmit 4 and AppleScript 2 by Ian Soper <http://iansoper.com>, 2010-12-15 | |
-- | |
-- An AppleScript to start working on a web development project by | |
-- * opening the project in TextMate, | |
-- * opening related URLs in the default browser, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ workon pen | |
$ git clone git://github.com/wardi/urwid.git | |
$ cd urwid | |
$ gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c source/str_util.c -o build/temp.macosx-10.6-universal-2.6/source/str_util.o | |
$ python setup.py build | |
$ python setup.py install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>jQuery Mobile Original Source Bookmarklet for Firefox and Chrome</title> | |
<style type="text/css" media="screen"> | |
body, html, h1 { margin: 0; padding: 0; } | |
html { padding: 20px; background: #ddd; } | |
body { max-width: 600px; margin: 0 auto; padding: 20px; box-sizing: border-box; background: #fff; font-family: Helvetica, arial; box-shadow: rgba(0,0,0,0.2) 0 0 5px } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the collections browse SQL to sort records alphabetically by name. | |
*/ | |
function filter_collections_alphabetically($select, $params) | |
{ | |
if (!array_key_exists('sort_field', $params)) { | |
$select->order('c.name ASC'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NUMSECTORS=600000 #300mb | |
URL=rsync://HOSTNAME/DIRECTORY/ | |
EXCLUDE=Evernote | |
BACKUP="\"Library/Application Support\" Documents" | |
PASSWORD= | |
# create ramdisk | |
RAMDISK=`hdid -nomount ram://$NUMSECTORS` | |
newfs_hfs $RAMDISK | |
RDPATH=/tmp/ramdisk.backup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fingerprint=`openssl s_client -connect tuner.pandora.com:443 < /dev/null 2> /dev/null | openssl x509 -noout -fingerprint | tr -d ':' | cut -d'=' -f2` && echo tls_fingerprint = $fingerprint >> ~/.config/pianobar/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup all important files on my computer using Duplicity | |
# Folders to include | |
include_directories=(/home/me /etc) | |
# Folders to exclude | |
exclude_directories=() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install pg -v '0.18.4' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on push(title, message) | |
set APP_TOKEN to "..." | |
set USER_KEY to "..." | |
do shell script "curl -s -F token=" & APP_TOKEN & " -F user=" & USER_KEY & " -F title=\"" & title & "\" -F message=\"" & message & "\" https://api.pushover.net/1/messages.json" | |
return | |
end push | |
using terms from application "Messages" | |
on message received theMessage from theBuddy for theChat |
OlderNewer