Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
#
# Author: Ian Eure <http://github.com/ieure>, <http://atomized.org>
#
"""Enter the debugger on exceptions.
example:
from __future__ import with_statement
=============================================================
Installing Multicore Solr 1.3.0 / Tomcat 6.0.X on Ubuntu 8.10
=============================================================
Install OpenJDK (comes from universe)::
aptitude install openjdk-6-jre
Download Tomcat 6.X and move it in place::
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
"""
The HOSTMAP variable is a dictionary of lists. The keys represent
roles of a server, the values represent the hostnames of machines that
fill those roles. If you are reading this, you likely know what you're
doing. If you don't know what you're doing, you probably want to put
your hostname into local_dev. Ensure it has a comma at the end, and
the hostname is a string.
You can get your hostname by typing `hostname` into a terminal.
"""
@asenchi
asenchi / resque.py
Created November 3, 2009 20:15 — forked from defunkt/resque.py
from redis import Redis
import simplejson
class Resque(object):
"""Dirt simple Resque client in Python. Can be used to create jobs."""
redis_server = 'localhost:6379'
def __init__(self):
host, port = self.redis_server.split(':')
self.redis = Redis(host=host, port=int(port))
@asenchi
asenchi / rlsp.rb
Created November 9, 2009 01:20 — forked from h0rs3r4dish/rlsp.rb
#!/usr/bin/ruby
RLSP_VERSION = "1.4.1"
class Lambda
attr_accessor :args, :body
def initialize(args=[],body="")
@args = (args.class == Array) ? args : [args]
@body = body
end
@asenchi
asenchi / pip
Created November 20, 2009 16:57
Overview of the steps and commands associated with virtualenv and pip.
$ sudo easy_install pip
$ sudo pip install virtualenv
$ sudo pip install virtualenvwrapper # (or virtualenv_wrapper)
$ WORKON_HOME=$HOME/.virtualenvs
$ PIP_VIRTUALENV_BASE=$WORKON_HOME
$ source /usr/local/bin/virtualenvwrapper_bashrc
$ mkvirtualenv projectname
$ easy_install pip
@asenchi
asenchi / emacs.sh
Created November 23, 2009 02:48 — forked from pfhawkins/emacs.sh
em() {
daemonproc=$(ps faux | egrep "emacs --daemon" | egrep -vc "egrep")
if [ $daemonproc = 1 ]; then
emacsclient -t $1
else;
emacs --daemon && emacsclient -t $1
fi
}
var cron = require('./cron'), sys = require('sys');
cron.Every((2).seconds(), function() { sys.puts('Working!'); });