Skip to content

Instantly share code, notes, and snippets.

@wraithan
wraithan / OSBridge.txt
Created March 2, 2012 03:03
OSBridge proposal
http://opensourcebridge.org/proposals/763
Excerpt:
How Pub/Sub helped my IRC bot stop living in the past and live in the moment. Also, special bonus features for polyglots!
Description:
When writing my dozenth IRC bot I decided that instead of the standard monolithic or plugin based bots I’d written in the past, I would write one in a highly decoupled way. Instead of plugins, I’d have services!
@wraithan
wraithan / Crash Log
Created March 21, 2012 02:26
Crash building Ruby in brew
Process: miniruby [48103]
Path: /private/tmp/*/miniruby
Identifier: miniruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: gnumake [47461]
Date/Time: 2012-03-20 19:18:19.866 -0700
OS Version: Mac OS X 10.7.3 (11D50d)
Report Version: 9
@wraithan
wraithan / Wat
Created April 1, 2012 22:02
Requirements for ZenIRCBot and services.
/home/wraithan/devel/zenircbot
├─┬ express@2.5.8
│ ├─┬ connect@1.8.6
│ │ └── formidable@1.0.9
│ ├── mime@1.2.4
│ ├── mkdirp@0.3.0
│ └── qs@0.4.2
├─┬ forever@0.8.5
│ ├─┬ broadway@0.1.14
│ │ ├── colors@0.6.0-1
#!/bin/bash
for config in $(find sync/config/ -maxdepth 1 -mindepth 1); do
target=~/$(basename $config)
[ -h $target ] || ln -s $config $target
done
# special cases
if [ -a ~/.unison ] && [ ! -h ~/.unison/default.prf ]; then
ln -s ~/.special/default.prf ~/.unison/default.prf
@wraithan
wraithan / redis_listen_example.py
Created April 11, 2012 17:08
Shows that messages are queued.
import redis
client = redis.StrictRedis()
pubsub = client.pubsub()
pubsub.subscribe('in')
# in redis: 1334163648.749540 "SUBSCRIBE" "in"
client2 = redis.StrictRedis()
client2.publish('in', 'meh1')
var chart = document.getElementById('chart');
var data = [{'type': 'bike', 'real': 180, 'goal': 160},
{'type': 'hike', 'real': 5, 'goal': 8},
{'type': 'run', 'real': 15, 'goal': 15}]
var chart = document.getElementById('chart')
var maxHeight = 100
var width = 10
@wraithan
wraithan / tempfile_example.py
Created May 9, 2012 00:25
Tempfile example for PDX Python Lightning Talk
import os
from random import sample
from tempfile import TemporaryFile
def func_that_takes_a_file_like(fd):
fd.write('I like files')
def sucky():
""" Do it all yourself.
python setup.py test
/usr/local/Cellar/python/2.7.3/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running test
running build
running build_py
running build_scripts
running test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setting up Salt daemons to execute tests
Getting involved is something I've blogged about a few times on here. Each time has been a pledge to get more involved in the open source community in different ways. I am more involved now than I have ever been previously. I feel comfortable finding an issue in a project, forking it, fixing it and sending a pull request. Also, I find myself writing docs for projects and sending them as pull requests as well.<br />
<br />
I was reading a <a href="http://alexgaynor.net/2012/jul/04/why-personal-funding/">post</a> from <a href="http://alexgaynor.net/">Alex Gaynor</a> about funding open source developers. I am all for that and in fact am using <a href="https://www.gittip.com/">Gittip </a>to fund several developers. Currently, I only fund each developer $3/week, which only comes out to $13.50 a month for each of them. But, I am unsure how many people I am going to end up funding and want to feel things out a bit before I commit more than that.<br />
<br />
Now I find myself putting forward a little time and money

Getting involved is something I've blogged about a few times on here. Each time has been a pledge to get more involved in the open source community in different ways. I am more involved now than I have ever been previously. I feel comfortable finding an issue in a project, forking it, fixing it and sending a pull request. Also, I find myself writing docs for projects and sending them as pull requests as well.

I was reading a post from Alex Gaynor about funding open source developers. I am all for that and in fact am using Gittip to fund several developers. Currently, I only fund each developer $3/week, which only comes out to $13.50 a month for each of them. But, I am unsure how many people I am going to end up funding and want to feel things out a bit before I commit more than that.

Now I find myself putting forward a little time and money