Skip to content

Instantly share code, notes, and snippets.

# Snippet to syntax-highlight source code files matching a certain pattern in Quicklook
# See see http://seandenigris.com/?p=412 for more info for more info
# Used with the qlcolorcode plugin
# Insert into QLColorCode.qlgenerator/Contents/Resources/colorize.sh
# Works for files in languages known to highlight (see qlcolorcode docs), but because of their filename, aren't recognized by Quicklook
#The commented lines are already in the file
#
# debug Handling special cases
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.text</string>
<string>public.source-code</string>
</array>
<key>UTTypeDescription</key>
<string>Ruby HTML Template file</string>
@tzarskyz
tzarskyz / tor
Created November 30, 2013 07:40 — forked from ihashacks/tor
--- tor.init 2013-07-29 23:06:25.329990252 -0700
+++ tor.init-patched 2013-07-28 22:26:13.919215615 -0700
@@ -24,6 +24,7 @@
DAEMON=/usr/sbin/tor
NAME=tor
DESC="tor daemon"
+TORLOGDIR=/var/log/tor
TORPIDDIR=/var/run/tor
TORPID=$TORPIDDIR/tor.pid
DEFAULTSFILE=/etc/default/$NAME
#!/bin/sh
# this code goes in your .bash_profile
# change colour on ssh connections and then back to the default theme
function tabc {
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi
osascript -e "tell application \"Terminal\"
set myWindow to front window
<?php
class Fetcher
{
private $_torIp = '127.0.0.1';
private $_torProxyPort = '8118';
protected function _request($url)
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
#!/bin/sh
PROG=$0
RSYNC="/usr/bin/rsync"
SRC="/"
DST="/Volumes/Backup/"
# rsync options
# -v increase verbosity
# -a turns on archive mode (recursive copy + retain attributes)
--------------------------------------------------
-- createnote.applescript
-- Evernote Command Line Proxy
-- by Maripo Goda <goda.mariko[at]gmail.com>
-- Required:
-- Mac OS X + AppleScript
-- Evernote for Mac OS X
-- Perl + JSON.pm
-- Usage:
-- Create a note with text
#!/bin/bash
#
# Get directory of the shell script itself
#
# Read the directory where the shell script is in
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Or resolve the symlink of the file if there is any