Skip to content

Instantly share code, notes, and snippets.

@rduplain
rduplain / simple_vertigo.py
Created October 29, 2013 21:24
Simple examples to get started with the vertigo package.
import vertigo
class EmptyGraphNode(vertigo.GraphNode):
@property
def value(self):
return None
def key_iter(self):
return ()
@rduplain
rduplain / gist:6886040
Created October 8, 2013 14:55
Cronic - A cure for Cron's chronic email problem - by Chuck Houpt - http://habilis.net/cronic/
#!/bin/bash
# Cronic v2 - cron job report wrapper
# Copyright 2007 Chuck Houpt. No rights reserved, whatsoever.
# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/
set -eu
OUT=/tmp/cronic.out.$$
ERR=/tmp/cronic.err.$$
@rduplain
rduplain / pyohio-2013-digest.md
Last active December 20, 2015 14:39
My notes from PyOhio 2013
@rduplain
rduplain / Vagrantfile
Created May 28, 2013 18:57
Simple Vagrantfile.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true
end
@rduplain
rduplain / Makefile
Created April 27, 2013 02:06
Makefile for key interactions on a Flask project deployed on heroku.
# Key project interactions, but not all dependencies are resolved by make.
help:
@heroku help
run:
python manage.py runserver
shell:
python manage.py shell
@rduplain
rduplain / Makefile
Last active November 10, 2018 03:18
A Makefile to download, install, and run redis-server. For @teebes.
# Call `make redis`, which runs redis binary after downloading/installing.
REDIS = redis-2.6.12
redis: bin/redis-server
# bin/redis-server path/to/redis.conf
bin/redis-server
bin/redis-server: src/$(REDIS)/src/redis-server
mkdir -p bin
@rduplain
rduplain / gist:5286899
Last active December 15, 2015 16:09
PyCHO PyCon Digest - Tue Apr 9 6pm at WillowTree Apps

PyCHO PyCon Digest - Tue Apr 9 6pm at WillowTree Apps

It's a Python meetup. Please promote in your circles!

Join us for a lively discussion where Charlottesville's PyCon 2013 attendees will share their highlights of the world's biggest Python conference. You can watch PyCon videos online for free, so you should come and find out which ones to watch! You will walk away with a few new Python tools you can use every day, too.

@rduplain
rduplain / forloop_function_scope.py
Created March 1, 2013 15:49
A look at lexical scoping of functions defined inside for-loops, in Python.
"A look at lexical scoping of functions defined inside for-loops, in Python."
import functools
def foo():
return 'foo'
def bar():
@rduplain
rduplain / file-logging.coffee
Created February 26, 2013 03:33
File logging script for hubot which patches adapter to also log messages from the bot itself.
# Description:
# Simple room logging, to log/yyyy-mm-dd.log files for all rooms.
# Patches robot adapter to also log messages from the bot.
# Log format is: isodate - room <user> text
#
# Dependencies:
# None
#
# Configuration:
# None
@rduplain
rduplain / file-logging.coffee
Last active December 14, 2015 05:28
Simple dated file logging script for hubot.
# Description:
# Simple room logging, to log/yyyy-mm-dd.log files for all rooms.
# Log format is: isodate - room <user> text
#
# Dependencies:
# None
#
# Configuration:
# None
#