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
// Switch out "DOMAIN" to be whatever the site domain is. | |
// | |
// ie. "colorjar" for http://colorjar.com | |
$.map($('a'), function(link){ | |
if (link.href.search(/.DOMAIN./) === -1){ | |
$(link).attr('target', '_blank'); | |
} | |
}); |
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
function neat_trim($str, $n, $delim='...') { | |
$len = strlen($str); | |
if ($len > $n) { | |
preg_match('/(.{' . $n . '}.*?)\b/', $str, $matches); | |
return rtrim($matches[1]) . $delim; | |
} | |
else { | |
return $str; | |
} | |
} |
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
// ------------------------------ | |
// Form Input Placeholder | |
// ------------------------------ | |
if (!Modernizr.input.placeholder) | |
{ | |
$('input[placeholder], textarea[placeholder]').each(function(i, input){ | |
var $input = $(input); | |
// Initially load the placeholder value | |
if ($input.val() === '') { $input.val($input.attr('placeholder')); } |
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
@font-face { | |
font-family: 'Lobster'; | |
font-style: normal; | |
font-weight: normal; | |
src: local('Lobster'), url('http://themes.googleusercontent.com/static/fonts/lobster/v4/NIaFDq6p6eLpSvtV2DTNDQLUuEpTyoUstqEm5AMlJo4.woff') format('woff'); | |
} |
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
#!/usr/bin/env python | |
""" | |
Last.fm scrobbling for Pianobar, the command-line Pandora client. Requires Pianobar, Python, pyLast and Last.fm API credentials. | |
https://github.com/PromyLOPh/pianobar/ | |
http://code.google.com/p/pylast/ | |
http://www.last.fm/api/account | |
Installation: | |
1) Copy this script and pylast.py to the Pianobar config directory, ~/.config/pianobar/, and make sure this script is executable |
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
# ***************************************** | |
# .irbrc | |
# | |
# Tim Harvey - Literacy5 | |
# http://literacy5.com/ | |
# | |
# Includes tons of visual sugar, based on the | |
# work of: | |
# | |
# UnixMonkey - http://gist.github.com/254551 |
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/sh | |
# | |
# An example hook script that is called after a successful | |
# commit is made. | |
# | |
# To enable this hook, rename this file to "post-commit". | |
: Nothing | |
afplay ~/.git/happykids.wav > /dev/null 2>&1 & |
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
# | |
# Configuration File for JavaScript Lint 0.2.6 | |
# Developed by Matthias Miller (http://www.JavaScriptLint.com) | |
# | |
# This configuration file can be used to lint a collection of scripts, or to enable | |
# or disable warnings for scripts that are linted via the command line. | |
# | |
#### NOTE TO TEXTMATE BUNDLE USERS: | |
#### Feel free to experiment with enabling/disabling individual warnings to |
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
// ======================================================== | |
// Route traffic through UK based proxy | |
// ======================================================== | |
function FindProxyForURL(url, host) { | |
// -------------------------------------------------------- | |
// No longer work still it seems | |
// -------------------------------------------------------- | |
// 92.52.125.20:80 |