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
#!/bin/sh | |
# Import a (g|b)zipped SQL dump into a specified database through pipeviewer. | |
if [ $# -lt 2 ]; then | |
echo "USAGE: $0 <filename> <database>" | |
exit 1 | |
fi | |
EXT=${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
#!/bin/bash | |
# Flush memcached with a single command. | |
echo "flush_all" | nc localhost 11211 |
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
#!/bin/bash | |
# Fetch and prune all remotes. | |
for r in `git remote` | |
do | |
git remote prune $r | |
git fetch $r | |
done |
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
#!/bin/bash | |
# Vacuum out .pyc files. | |
find . -name "*.pyc" -type f -exec rm {} \; |
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
#!/bin/bash | |
# Use colordiff and less to get git-like diffs out of SVN, too. | |
if [ -d '.svn' ]; then | |
DIFF=`svn diff $1` | |
if [ -n "$DIFF" ]; then | |
echo "$DIFF" | colordiff | less -R | |
fi | |
fi |
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
#!/bin/bash | |
# allows you to send pull requests from the command line | |
# usage: git req username [comparetobranch] | |
# or: git req username -m 'message' | |
# put somewhere in your PATH as git-req and make executable | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options |
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
########################### | |
# WTF Module # | |
########################### | |
# WTF.bm - the WTF module for MozBot 2.6 | |
# The WTF Module counts all the "wtf"s it hears in any channel the bot | |
# is in, and when you ask it "wtfs" will tell you how many it's heard. | |
# @author James Socol <[email protected]> | |
# @license MIT/X11. Go nuts. |
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
########################### | |
# Dungeon Module # | |
########################### | |
package BotModules::Dungeon; | |
use vars qw(@ISA); | |
@ISA = qw(BotModules); | |
use DBI; | |
use strict; | |
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
try: | |
from functools import wraps | |
except ImportError: | |
from django.utls.functional import wraps | |
from django.conf import settings | |
from django.contrib.auth import REDIRECT_FIELD_NAME | |
from django.http import HttpResponseForbidden, HttpResponseRedirect | |
from django.template import loader, RequestContext, TemplateDoesNotExist | |
from django.utils.decorators import available_attrs |
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
// Add me right before </body>. | |
(function() { | |
function changeHandler() { | |
var source = document.getElementById('source-textarea').value, | |
result; | |
result = doYourThing(source); | |
document.getElementById('result-textarea').value = result; | |
} |
OlderNewer