Skip to content

Instantly share code, notes, and snippets.

@kueda
kueda / tmbundle.sh
Created October 14, 2008 16:49
Simple bash script for installing TextMate bundles
#!/bin/bash
tmsupportpath="/Library/Application Support/TextMate"
bundlepath="$tmsupportpath/Bundles"
if [ ! -d "$bundlepath" ]
then
echo "First time, eh? Making $bundlepath..."
mkdir -p "$bundlepath"
fi
if [ ! -d "$tmsupportpath/Support" ]
javascript:
if (window.hah){
hah.removeHints();
}
window.hah = {
hintKeys : new String('asdfghjkl'),
selector: 'a[href]:not([href^="mailto:"]), input:not([type="hidden"]), textarea, select, img[onclick], button',
xpath: '//a[@href]|//input[not(@type=\x22hidden\x22)]|//textarea|//select|//img[@onclick]|//button',
xpathMode : true,
hintColorLink : '\x23FFFF00',
@seandenigris
seandenigris / Info.plist
Created March 3, 2010 02:48
Quicklook for HAML and ERB files (see instructions at http://seandenigris.com/?p=403)
<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>
require 'growl'
module Jekyll
class GrowlPreHook < Hook
safe false
sequence :pre
def run(site)
Growl.notify 'Building...', :title => 'Jekyll'
end
on run {input, parameters}
repeat with n in input
set z to (n as alias)
set n to (info for z)'s name
tell application "Finder" to set P to z's container as alias
set zP to POSIX path of (P as text) & n
try
set the_URL to do shell script "mdls -name kMDItemWhereFroms" & space & zP & space & "|" & space & "grep -o '\"'.*'\"'"
set the_URL to replace_chars(the_URL, "\"", "")
tell application "Finder"
@reid
reid / safari-taskpaper.scpt
Created January 21, 2011 22:33
Send current Safari selection or web page to TaskPaper
tell application "Safari"
tell front document
set theURL to URL
set theName to (do JavaScript "(getSelection())")
if length of theName is equal to 0 then set theName to name
end tell
end tell
tell application "TaskPaper"
tell front document
tell project named "Inbox"
@memphys
memphys / fetcher.php
Created April 16, 2011 18:05
fetch some url through tor
<?php
class Fetcher
{
private $_torIp = '127.0.0.1';
private $_torProxyPort = '8118';
protected function _request($url)
@butaji
butaji / bundles.sh
Created April 24, 2011 19:41 — forked from mads-hartmann/bundles.sh
This is how I manage my textmate bundles.
#
# This script will install the following Textmate bundles
#
# Languages
# - c https://github.com/textmate/c.tmbundle
# - coffeescript https://github.com/jashkenas/coffee-script-tmbundle
# - context free https://github.com/textmate/context-free.tmbundle
# - erlang https://github.com/textmate/erlang.tmbundle
# - haskell https://github.com/textmate/haskell.tmbundle.git
# - html https://github.com/textmate/html.tmbundle
@rosskarchner
rosskarchner / gist:967562
Created May 11, 2011 22:47
Saves the visible page in Chrome as a full-page screenshot, in Evernote, via the freeware Paparazzi! app
on run {input, parameters}
tell application "Google Chrome"
set myURL to URL of active tab of window 1
set myTitle to title of active tab of window 1
end tell
tell application "Paparazzi!"
capture myURL min size {1024, 728}
@fixlr
fixlr / Custom Searches.md
Created May 12, 2011 16:47
Some of my current Alfred shortcuts