As configured in my dotfiles.
start new:
tmux
start new with session name:
| /** Class: Strophe.WebSocket | |
| * XMPP Connection manager. | |
| * | |
| * Thie class is the main part of Strophe. It manages a BOSH connection | |
| * to an XMPP server and dispatches events to the user callbacks as | |
| * data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, and legacy | |
| * authentication. | |
| * | |
| * After creating a Strophe.Connection object, the user will typically | |
| * call connect() with a user supplied callback to handle connection level |
| #!/bin/bash | |
| # Copyright 2010 Eric Ryan Harrison <me@ericharrison.info> | |
| # Inspired by: | |
| # http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/ | |
| if [ -n "$1" ] | |
| then | |
| if [ "$1" = "off" ] | |
| then | |
| tc qdisc del dev lo root |
| #!/usr/bin/env perl | |
| # Usage | |
| # | |
| # cat <<EOF | ./org2doku | |
| # * heading | |
| # | |
| # - item | |
| # - sub item | |
| # |
| """ | |
| Augment scatter plot with linear regression fit | |
| David Andrzejewski | |
| """ | |
| import numpy as NP | |
| import numpy.random as NPR | |
| import matplotlib.pyplot as P | |
| import matplotlib.lines as L | |
| from scikits.learn.linear_model import LinearRegression |
| # -*- coding: utf-8 -*- | |
| #!/usr/bin/env python | |
| import sys | |
| import os | |
| import re | |
| import yaml | |
| import urllib | |
| import codecs | |
| from datetime import datetime | |
| from BeautifulSoup import BeautifulStoneSoup, Comment |
| #!/bin/sh | |
| # | |
| # Shell script that configures gnome-terminal to use solarized theme | |
| # colors. Written for Ubuntu 11.10, untested on anything else. | |
| # | |
| # Solarized theme: http://ethanschoonover.com/solarized | |
| # | |
| # Adapted from these sources: | |
| # https://gist.github.com/1280177 | |
| # http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ |
| -module(ring). | |
| -export([start/3, loop/0]). | |
| %%% | |
| %%% An implementation of an Erlang process ring. This is probably the | |
| %%% Erlang equivalent of breaking your first board in Karate class. | |
| %%% | |
| start(NumMsgs, NumProcs, Msg) -> | |
| UnlinkedRing = create_process([], NumProcs), |
| function maybe(value) { | |
| var obj = null; | |
| function isEmpty() { return value === undefined || value === null } | |
| function nonEmpty() { return !isEmpty() } | |
| obj = { | |
| map: function (f) { return isEmpty() ? obj : maybe(f(value)) }, | |
| getOrElse: function (n) { return isEmpty() ? n : value }, | |
| isEmpty: isEmpty, | |
| nonEmpty: nonEmpty | |
| } |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| mkdir demo | |
| cd demo | |
| wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz | |
| wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz | |
| tar -zxvf magento-1.8.1.0.tar.gz | |
| tar -zxvf magento-sample-data-1.6.1.0.tar.gz | |
| mv magento-sample-data-1.6.1.0/media/* magento/media/ | |
| mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql | |
| mv magento/* magento/.htaccess . | |
| chmod o+w var var/.htaccess app/etc |