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
| # Replace REMOTE_NAME with your remote name (e.g. origin) | |
| git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; 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
| 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}" | |
| case $c in |
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
| def application(environ, start_response): | |
| import sys | |
| path = 'YOUR_WWW_ROOT_DIRECTORY' | |
| if path not in sys.path: | |
| sys.path.append(path) | |
| from pyinfo import pyinfo | |
| output = pyinfo() | |
| start_response('200 OK', [('Content-type', 'text/html')]) | |
| return [output] |
NewerOlder