This file contains hidden or 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
namespace :britt do | |
desc 'Removes trailing whitespace and tabs' | |
task :space do | |
sh %{find . -name '*.rb' -exec sed -i '' -e 's/[`echo -ne "\t"` ]*$//g' {} \\;} | |
end | |
end |
This file contains hidden or 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
<?php | |
class SmartXML implements ArrayAccess | |
{ | |
private var $xml; | |
public __construct($xml) | |
{ | |
$this->xml = $xml; | |
} |
This file contains hidden or 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
<?php | |
$xml = new SimpleXMLElement('<sitemap></sitemap>'); | |
foreach ($pages as $page) | |
$page_xml = $xml->addChild('page'); | |
$page_xml->addChild('loc', $page['loc']); | |
$page_xml->addChild('priority', $page['priority']); | |
$page_xml->addChild('changefreq', $page['changefreq']); | |
} |
This file contains hidden or 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
// ==UserScript== | |
// @name Shift back | |
// @namespace http://twitter.com | |
// @include http://twitter.com/* | |
// ==/UserScript== | |
$ = unsafeWindow.jQuery; | |
var tab_hijack = function(e) { | |
if (e.keyCode == 9) { |
This file contains hidden or 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 | |
# | |
# Generates non-unique word list from Twitter Search meeting certain | |
# criteria (as set in the configuration, below). | |
# | |
# EXAMPLE (word wrap inserted for ease of reading): | |
# | |
# $ python hashtag_wordle.py | |
# Fetching http://search.twitter.com/search.json?q=%23spinuzzi-project&rpp=30&page=1... | |
# Fetching http://search.twitter.com/search.json?q=%23spinuzzi-project&rpp=30&page=2... |
This file contains hidden or 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
$ ./scrape.py | |
Fetching http://search.twitter.com/search.json?q=from%3Aaustinonrails&rpp=30&page=1... | |
Fetching http://search.twitter.com/search.json?q=from%3Aaustinonrails&rpp=30&page=2... | |
Fetching http://search.twitter.com/search.json?q=from%3Aaustinonrails&rpp=30&page=3... | |
set([u'damon', u'jbritten', u'bravodeltahotel', u'keithdadkins', u'bilesonline']) |
This file contains hidden or 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
# Fork of http://bazaar.launchpad.net/~mrooney/nutunes/trunk/annotate/head%3A/nutunes.py | |
# Fetch your top artists from Last.FM and show the most recent Waffles torrents. | |
# Depends: python >= 2.5, feedparser (python-feedparser in Ubuntu) | |
from xml.etree import ElementTree as ET | |
from cookielib import CookieJar, DefaultCookiePolicy | |
import urllib2, urllib, re, getpass, feedparser | |
def enable_cookies(): |
This file contains hidden or 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
# | |
# retrieves 10 pages of search json near:austin | |
# | |
# usage: | |
# python populate.py <search term> | |
# | |
from pprint import pprint | |
import simplejson as json | |
import urllib, urllib2 |
This file contains hidden or 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
# To install an application, you may use the command “/opt/Adobe AIR/Versions/1.0/airappinstaller <full path to the air file here>”. Currently relative paths do not work. | |
from: http://labs.adobe.com/wiki/index.php/AIR_for_Linux:Release_Notes#Application_Installation_.2F_Uninstallation_Details | |
so, use an absolute path. for example if it's in the current directory: | |
/opt/Adobe AIR/Versions/1.0/airappinstaller `pwd`/yourapp.air |
This file contains hidden or 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
_imaging.c:ImagingError_Mismatch(void) | |
libImaging/Antialias.c: return (Imaging) ImagingError_Mismatch(); | |
libImaging/Bands.c: return (Imaging) ImagingError_Mismatch(); | |
libImaging/Blend.c: return ImagingError_Mismatch(); | |
libImaging/Chops.c: return (Imaging) ImagingError_Mismatch(); | |
libImaging/Except.c:ImagingError_Mismatch(void) | |
libImaging/Geometry.c: return (Imaging) ImagingError_Mismatch(); | |
libImaging/Geometry.c: return (Imaging) ImagingError_Mismatch(); | |
libImaging/Geometry.c: return (Imaging) ImagingError_Mismatch(); | |
libImaging/Geometry.c: return (Imaging) ImagingError_Mismatch(); |
OlderNewer