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
#!/usr/bin/env python | |
""" Make a Git checkout from an SVN repository """ | |
import os | |
from subprocess import check_call, check_output | |
def option_parser(): | |
from optparse import OptionParser | |
parser = OptionParser(usage="usage: %prog svn_url [-a]") |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Checkboxes to dropdown</title> | |
</head> | |
<body> | |
<script src="jquery-1.4.2.min.js"></script> | |
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
<!-- ZPT: write clean inline JavaScript code --> | |
<!-- rstk.json_dumps translates the Python dict to a JS dict, used in JS code --> | |
<script> | |
function setup_my_html(config) { | |
var e = document.getElementById(config.the_id); | |
//.... | |
} | |
</script> |
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 | |
# Extract an SVN revision number from `git log` and then invoke `python setup.py sdist` | |
prepare_cmd() { | |
[[ $PYTHON = '' ]] && { | |
PYTHON='python' | |
} | |
REV=`git log -1 | grep -n git-svn-id | perl -e '$_ = <> and /@(\d+) / and print $1'` || { | |
echo 'failed extract_gitsvn_version' |
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
alexm@tufa:~$ brew install -v mapnik | |
==> Downloading http://download.berlios.de/mapnik/mapnik-0.7.1.tar.gz | |
File already downloaded in /Users/alexm/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/alexm/Library/Caches/Homebrew/mapnik-0.7.1.tar.gz | |
==> scons PREFIX=/usr/local/Cellar/mapnik/0.7.1 ICU_INCLUDES=/usr/local/Cellar/icu4c/4.4.1/include ICU_LIBS=/usr/local/Cellar/icu4c/4.4.1/lib install | |
scons PREFIX=/usr/local/Cellar/mapnik/0.7.1 ICU_INCLUDES=/usr/local/Cellar/icu4c/4.4.1/include ICU_LIBS=/usr/local/Cellar/icu4c/4.4.1/lib install | |
scons: Reading SConscript files ... | |
Welcome to Mapnik... |
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
alexm@tufa:~$ otool -L /usr/local/Cellar/icu4c/4.4.1/lib/libicuuc.dylib | |
/usr/local/Cellar/icu4c/4.4.1/lib/libicuuc.dylib: | |
libicuuc.44.dylib (compatibility version 44.0.0, current version 44.1.0) | |
libicudata.44.dylib (compatibility version 44.0.0, current version 44.1.0) | |
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10) | |
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) | |
alexm@tufa:~$ otool -L /usr/local/lib/libboost_regex-mt.dylib | |
/usr/local/lib/libboost_regex-mt.dylib: | |
/usr/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0) | |
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) |
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
#!/usr/bin/env python | |
import urllib2 | |
import re | |
import subprocess | |
from time import strftime | |
url_list = [ | |
] |
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
#!/usr/bin/env python | |
import os | |
from subprocess import check_call | |
def sync_git_svn(repo_path): | |
check_call(['git', 'svn', 'rebase', '-qq'], cwd=repo_path) | |
check_call(['git', 'gc', '-q'], cwd=repo_path) | |
check_call(['git', 'push', '-q'], cwd=repo_path) |
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 | |
# start/stop a PHP FastCGI daemon | |
# copied from http://davehall.com.au/blog/dave/2010/03/16/making-it-easier-spawn-php-cgi-debian-and-ubuntu | |
# modified to listen on unix socket | |
### BEGIN INIT INFO | |
# Provides: php-fastcgi | |
# Required-Start: $local_fs $syslog |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <strings.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <unistd.h> | |
int httpd_listen(unsigned short int port) { | |
int sock; |