Skip to content

Instantly share code, notes, and snippets.

View pwenzel's full-sized avatar

Paul Wenzel pwenzel

View GitHub Profile
@ishikawa
ishikawa / itunes.sh
Created April 4, 2010 09:04
itunes.sh - control your iTunes from shell
#/bin/bash
#
# itunes.sh - Control Your iTunes from shell
#
TRACK_PROGRAM=`cat <<EOS
tell current track
name & " - " & artist
end tell
EOS`
@iansoper
iansoper / CodaLight.scpt
Created December 15, 2010 15:35
Open your web development project in TextMate + Transmit + Terminal (kinda like Coda)
-- 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,
@ShaneIsley
ShaneIsley / gist:965891
Created May 11, 2011 03:48
urwid & mitmproxy install on OSX http://pastebin.com/rAd9Bt7E
$ 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
@scottjehl
scottjehl / jquery-bookmarklet.html
Created June 22, 2011 19:32 — forked from dcneiner/jquery-bookmarklet.html
jQuery Mobile View Source Bookmarklet Website
<!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 }
@jeremyboggs
jeremyboggs / filter_collections_alphabetically.php
Created September 20, 2011 02:12
Filter the collections browse SQL to sort records alphabetically by name.
<?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');
}
@ptitov
ptitov / backup.sh
Created November 26, 2011 19:37
MacOS user data rsync backup script with openssl encryption
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
@jacroe
jacroe / pianobar_tls.sh
Created December 4, 2012 04:40
Appends the fingerprint to the end of Pianobar's config file
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
@dmp1ce
dmp1ce / duplicity_backup.sh
Created September 15, 2012 01:44
Duplicity backup script
#!/bin/bash
# Backup all important files on my computer using Duplicity
# Folders to include
include_directories=(/home/me /etc)
# Folders to exclude
exclude_directories=()
@adamlutz
adamlutz / postgres rails config fix
Last active May 15, 2016 18:22
postgres rails config fix for postgres.app
gem install pg -v '0.18.4' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
@c99koder
c99koder / pebble.applescript
Last active December 7, 2017 21:25
Forward iMessges to Pebble using PushOver. Fill in your APP_TOKEN and USER_KEY. In the "Alerts" tab of Messages' settings, tell it to run this script for "Message Received" and "Text Invitation"
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