This file contains 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 very crude implmentation of python's format() for javascript, | |
* supporting simple replacement fields, eg:: | |
* | |
* >>> format('{0} is {1}', 'javascript', 'cool') | |
* "javascript is cool" | |
* | |
* works for my purposes, but no where close to implementing full | |
* capabilities as described at:: | |
* http://docs.python.org/library/string.html#formatstrings |
This file contains 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>flot vs raphael</title> | |
<script type="text/javascript" src="jquery.min.js"></script> | |
<script type="text/javascript" src="jquery.flot.min.js"></script> | |
<script type="text/javascript" src="raphael.js"></script> | |
<script type="text/javascript" src="g.raphael-min.js"></script> |
This file contains 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
export EDITOR=vi | |
# terminal colors | |
LS_COLORS='no=00:fi=00:di=01;36:ln=01;93:pi=40;33:so=01;35:do=01;35:bd=40;33;01: | |
cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31 | |
:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31: | |
*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=0 | |
1;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.t |
This file contains 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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by irssi configure 0.8.14, which was | |
generated by GNU Autoconf 2.63. Invocation command line was | |
$ ./configure --prefix=/usr/local/Cellar/irssi/0.8.14 --disable-debug --disable-dependency-tracking --with-modules --enable-ssl --enable-ipv6 --with-perl=yes | |
## --------- ## | |
## Platform. ## |
This file contains 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 | |
# encoding: utf-8 | |
""" | |
In the spirit of python's json.tool, provide a command line | |
utility to pretty print XML. | |
Usage (): | |
$ echo "<book><title>Oliver Twist</title></book>" | python -m xmltool | |
<?xml version="1.0" encoding="utf-8"?> |
This file contains 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
''' | |
Django middleware that sets a tracking id (fetched from a ticket server) as a | |
cookie in the http response. | |
This assumes you have setup a couple k/v stores as ticket servers and that | |
you know the key. For demonstration purposes only, here is how one might do it | |
with redis: | |
# start a redis server on default port (6379) | |
$ redis-server /usr/local/etc/redis.conf &> /dev/null & |
This file contains 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 fabric.api import * | |
env.roledefs['servers'] = [ | |
'ec2-184-72-2-243.us-west-1.compute.amazonaws.com', | |
'ec2-204-236-153-163.us-west-1.compute.amazonaws.com', | |
] | |
@roles('servers') | |
def poke(): | |
local("whoami") |
This file contains 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 | |
# ########## | |
# | |
# Usage: | |
# ec2_hosts.py | |
# | |
# Then copy results to /etc/hosts | |
# | |
# ########## |
This file contains 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
# Start ircd-hybrid when invoked via init.d shell script. | |
START=yes |
This file contains 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 | |
# hybserv Start/stop Hybserv 2 IRC Services | |
# Version: hybserv 1.8.0 17-Mar-2003 [email protected] | |
# Version: hybserv 1.9.2 05-Sep-2006 [email protected] | |
### BEGIN INIT INFO | |
# Provides: hybserv | |
# Required-Start: $syslog ircd-hybrid | |
# Required-Stop: $syslog ircd-hybrid |
OlderNewer