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
easterEgg.BadWorder.list={ | |
"4r5e":1, | |
"5h1t":1, | |
"5hit":1, | |
a55:1, | |
anal:1, | |
anus:1, | |
ar5e:1, | |
arrse:1, | |
arse:1, |
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
rhc app cartridge start -a APP -c mongodb-2.0 -l USER |
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
function checkURLs() { | |
var errors = []; | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var rows = ss.getDataRange().getValues(); | |
for (i in rows) { | |
var url = rows[i][0]; | |
var response = UrlFetchApp.fetch(url, {muteHttpExceptions: true}); | |
var status = response.getResponseCode(); | |
if (status !== 200) | |
errors.push(status + ' - '+ url); |
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
# http://coding.smashingmagazine.com/2012/10/29/powerful-command-line-tools-developers/ | |
alias tunnel='sshuttle -D --pidfile=/tmp/sshuttle.pid -r <server> --dns 0/0' | |
alias stoptunnel='[[ -f /tmp/sshuttle.pid ]] && kill `cat /tmp/sshuttle.pid`' |
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
# coding: utf-8 | |
# requires: pattern http://www.clips.ua.ac.be/pages/pattern | |
from pattern.web import * | |
import csv | |
import itertools | |
# engine = Google(license='XXX', throttle=2.0) | |
#engine = Twitter(license=None) | |
engine = Bing() |
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
$('input').each(function(){$(this).attr('checked', false)}) |
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
# create user and database with user as admin | |
sudo -u postgres createuser -D -A -P uname | |
sudo -u postgres createdb -O uname dbname | |
# delete database and user | |
sudo -u postgres dropdb dbname | |
sudo -u postgres dropuser uname | |
# dump and import data | |
pg_dump --clean -U uname dbname > dump.sql |
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
from django.utils import timezone | |
import time | |
# feed = object from DB | |
# doc = parsed feedparser object | |
feed.updated_at = doc.feed.get('updated_parsed', timezone.now()) | |
if isinstance(feed.updated_at, time.struct_time): | |
feed.updated_at = timezone.make_aware( | |
timezone.datetime(*feed.updated_at[:-3]), |
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
$('a[href="'+document.location.pathname+'"]').parent('li').attr('class', 'active') |
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
.modal { | |
width:38%; /* desired relative width */ | |
left:31%; /* (100%-width)/2 */ | |
height:56%; /* desired relative height */ | |
top:22%; /* (100%-height)/2 */ | |
margin:auto; /* place center */ | |
} |