Skip to content

Instantly share code, notes, and snippets.

@roymax
roymax / ip-up
Created April 9, 2012 09:32
vpn-router-ip-up
#!/bin/sh
# VPN_GATEWAY is the remote address of the vpn tunnel
# when ppp executes this script it will pass several values to it
# $5 will hold the remote gateway
VPN_GATEWAY=192.168.20.239
if [ "${5:-}" = "${VPN_GATEWAY}" ]
then
/sbin/route add 192.168.30.0/24 $5
fi
@jeredb
jeredb / Clipper.scpt
Created April 9, 2012 20:52
System wide TaskPaper Clipper
(*
Run as Automator Service and add keyboard shortcut in "Keyboard" preference pane.
*)
on run {input, parameters}
tell application "TaskPaper"
tell front document
tell project named "Inbox"
@Watson1978
Watson1978 / github-flavored-markdown.rb
Created April 10, 2012 01:11
GitHub Flavored Markdown parser
#!/usr/local/bin/ruby
# To parse GitHub Flavored Markdown
#
# Setup
# $ sudo easy_install pygments
# $ sudo gem install pygments.rb
# $ sudo gem install redcarpet
require 'redcarpet'
require 'pathname'
@PhilT
PhilT / pw
Created April 12, 2012 22:17
Simple way to store and retrieve website passwords encrypted with a master password
#!/bin/bash
# https://gist.github.com/2371406
# version 0.1 - Not much error handling yet.
# version 0.2 - Added --edit command
#
# Add to ~/bin/pw and chmod +x it.
# See bottom of file for usage.
PASSWORD_FILE=~/Documents/.passwords.csv
@patrickwelker
patrickwelker / gist:2405115
Created April 17, 2012 10:26 — forked from rfbrazier/gist:1077160
Create an OmniFocus task from the current URL of the active Chrome tab
tell application "Google Chrome"
set theTitle to title of active tab of front window
set theURL to URL of active tab of front window
end tell
tell application "OmniFocus"
set theDoc to default document
set theTask to theTitle
set theNote to theURL
@agriffis
agriffis / gist:2481292
Created April 24, 2012 16:37
.bashrc.virtualenvwrapper
# Dynamically load virtualenvwrapper functions to reduce shell startup
# time.
#
# Copyright 2012 Aron Griffis <[email protected]>
# Released under the GNU GPL v3
#######################################################################
# Python virtualenvwrapper loads really slowly, so load it on demand.
if [[ $(type -t workon) != function ]]; then
virtualenv_funcs=( workon deactivate mkvirtualenv )
#!/usr/bin/python
# VertiCal: A slim monthly calendar (that's perfect for GeekTool)
# by Rob Dumas
# Copyright (c) 2012 GNU Public License version 3.
# See http://www.gnu.org/licenses/licenses.html for details on this license.
import sys
import datetime
import calendar
@ChewingPencils
ChewingPencils / drafts_bookmarklets
Created May 2, 2012 19:02
Bookmarklets for Drafts App
/*
Drafts App Bookmarklets (http://agiletortoise.com/drafts)
Author: Sean Korzdorfer
Date: 14:01:43 Wed May 02 2012
Nota Bene: It's probably best to have the bookmarklet create a script tag that includes an external JS.
See: https://gist.github.com/2777049
Sends the current Mobile Safari Tab to Drafts app as Markdown link with date and time stamps
@ngs
ngs / 132894.README.mkdn
Created May 9, 2012 17:52
GitHub AutoMore - Hits more button automaticallly
@jessedc
jessedc / ObsidianCode.dvtcolortheme
Last active April 20, 2016 09:22 — forked from subdigital/ObsidianCode.dvtcolortheme
Obsidian Code Theme for Xcode 4
<?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>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>