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
# in case you ever come across a similar error in python: | |
# | |
# UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in | |
# position 2: ordinal not in range(128) | |
# | |
# simply use these | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') |
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 | |
sudo apt-get install build-essential | |
sudo apt-get install ruby | |
sudo apt-get install rubygems | |
sudo apt-get install ruby1.8-dev | |
# if the following doesn't work (Debian systems for example) use | |
# sudo gem install rubygems-update | |
# /var/lib/gems/1.8/bin/update_rubygems | |
sudo gem update --system | |
sudo gem sources -a http://gems.github.com/ |
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 | |
# Invocation: ./domain_available.sh domain.com [email protected] | |
# Could be configured with cron to alert you when a domain is available. | |
MAILTO=$2 | |
DOMAIN=$1 | |
STATUS=`whois $DOMAIN | grep 'Status:' | awk -F ' ' '{ print \$2; }'` | |
STATUS=${STATUS:="available"} |
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
diff --git a/apps/bednets/constants.py b/apps/bednets/constants.py | |
index 20709dd..0f33557 100644 | |
--- a/apps/bednets/constants.py | |
+++ b/apps/bednets/constants.py | |
@@ -1,6 +1,6 @@ | |
#!/usr/bin/env python | |
# vim: ai et sts=4 sw=4 ts=4 | |
-from reporters.models import Location | |
+from locations.models import Location | |
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/php | |
<?php | |
// A git pre-commit script for drupal-based repositories | |
$output = array(); | |
$return = 0; | |
exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return); | |
$against = $return == 0 ? 'HEAD' : '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; |
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 | |
### BEGIN INIT INFO | |
# Provides: mongodb | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the mongodb data-store | |
# Description: starts mongodb using start-stop-daemon |
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 | |
import sys | |
import re | |
from datetime import datetime | |
import csv | |
from BeautifulSoup import BeautifulSoup | |
import urllib2 | |
from urllib import urlencode | |
from time import sleep |
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 | |
#----------------------------------------------+ | |
# If you happen to do BlackBerry Application | | |
# development with PhoneGap on Linux, this | | |
# utility will come in handy. It automates | | |
# copying the phonegap library files to your | | |
# BlackBerry project. This should should be | | |
# copied to your extracted phonegap-blackberry | | |
# directory. | |
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 | |
# uses Google's Closure Compiler - http://code.google.com/p/closure-compiler/ | |
test -e $1 && java -jar /path/to/compiler.jar --js $1 --js_output_file `basename $1 .js`.min.js |
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
from boss import BossFactory | |
from sys import argv | |
import yaml | |
config = yaml.load(file('config.yml', 'rb').read()) | |
boss = BossFactory(appid=config['yahookey']) | |
offset = 0 | |
done = False | |
urls = [] |
OlderNewer