Skip to content

Instantly share code, notes, and snippets.

View MindGeek's full-sized avatar

Mg Guan MindGeek

View GitHub Profile
#!/bin/bash
function urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
#
# original: http://code.activestate.com/recipes/65287/
#
# place in lib/python2.x/sitecustomize.py
import bdb
import sys
def info(type, value, tb):
if hasattr(sys, 'ps1') \