Skip to content

Instantly share code, notes, and snippets.

ibeex /
Created Dec 7, 2011 — forked from stefanv/
Command line sparks in Python
# coding=utf-8
# Python version of Zach Holman's "spark"
# by Stefan van der Walt <>
ibeex /
Created Feb 14, 2012 — forked from bostwick/
Facebook News Feed Word Cloud
#!/usr/bin/env python
import sys
import urllib2
import json
from collections import defaultdict
from nltk import word_tokenize
IGNORED_WORDS = ["!", ".", ",", "(", ")", "'s", ":", "?", "...", "$",
ibeex / rc.d
Created Jul 18, 2012 — forked from jippi/rc.d
Logstash Init script
View rc.d
update-rc.d logstash-shipper defaults
update-rc.d logstash-reader defaults
#! /bin/sh
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
ibeex /
Last active Dec 23, 2015 — forked from bxt/
# Originally from
# Usage:
# Stup localhost 80000 as proxy in web browser cache will cache the files
# on disc and not redownload it again.
# To clear the cache simply do a `rm *.cached`. To stop the server simply
# send SIGINT (Ctrl-C). It does not handle any headers or post data.
import BaseHTTPServer
import hashlib
View gist:6917820
import os
import signal
import sys
import errno
from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer
_PIDS = []
View ocr.markdown

Install ImageMagick (>= 6.8.0-10) for image conversion:

brew install imagemagick

Install leptonica (>= 1.69) and tesseract (>= 3.02.02) for OCR:

brew install leptonica
brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.

set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
ibeex / .gitignore
Created Jul 19, 2012 — forked from karmi/.gitignore
Import your Gmail messages into ElasticSearch and search them with a simple web application.
View .gitignore
ibeex / foo.log
Created Aug 4, 2012
Flask logging example
View foo.log
A warning occurred (42 apples)
An error occurred