Skip to content

Instantly share code, notes, and snippets.

mgood@capstone11 ~/D/c/b/boots.mgood> boots -H capstonedd -l python
Boots (v0.2.0)
capstonedd:3306 (server v2009.11.1220)
> from boots.api import constructors
> @constructors.register('reverse')
+ def reverse():
+ from boots.api.nodes.node import SyncNode
+ from boots.api.api import Rows
+ def reverse_data(data):
+ return Rows((("".join(reversed(field)) if isinstance(field,basestring) else field
chromakode /
Created May 1, 2012
Start reddit in a chroot
# Max's groovy chroot script
# Install Ubuntu Natty via debootstrap and then run Neil's install script.
# Then adjust the bind mounts to suit your personal locations for the reddit code.
if mount | grep -q reddit

Keybase proof

I hereby claim:

  • I am chromakode on github.
  • I am chromakode ( on keybase.
  • I have a public key ASCluTVDeOcCBkDGS7RVqebTOEGGFu4_jLnJdglEDhJ08wo

To claim this, I am signing this object:

chromakode / saved.js
Created Jun 22, 2011
Fetch saved links from reddit. Paste into a web browser's JavaScript console to run. Make sure you enable popups.
View saved.js
(function(cb, after, saved) {
var next = arguments.callee
console.log("Requesting after", after)
$.getJSON('', {after:after}, function(data) {
saved = (saved || []).concat(
if ( {
console.log('Fetched:', saved.length)
next(cb,, saved)
} else {
chromakode / trekbot.js
Last active Mar 9, 2020
A star trek questions Discord bot using Wavenet TTS
View trekbot.js
const fs = require('fs').promises
const sample = require('lodash/sample')
const intoStream = require('into-stream')
const Discord = require('discord.js')
const textToSpeech = require('@google-cloud/text-to-speech')
const tts = new textToSpeech.TextToSpeechClient()
function waitFor(emitter, event) {
return new Promise(resolve => emitter.once(event, resolve))
import time
from urllib2 import urlopen, quote
import json
def fetch_comments(after=None):
url = ""
if after:
url += "?after={0}".format(quote(after))
#print "... Fetching {0} ...".format(url)