Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Do you know where your browsers are?</title>
<link rel="stylesheet" href="boilerplate.css">
<!-- The key must be generated per-domain from
http://code.google.com/apis/maps/signup.html -->
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAdKqUl5P5ngUsPujIZwvdLxT-kkuWzSk8krYKTTtCBWsRXId_rRTY8yt15zaUmCJYh3zpAZ07ywSc7g"
#!/bin/bash
# Sets ~site_packages and tries to `cd ~/dev/<virtualenv`.
site_packages=$(virtualenvwrapper_get_site_packages_dir)
PROJECT=`basename $VIRTUAL_ENV`
DIR="$HOME/dev/$PROJECT"
if [ -d $DIR ]; then
@jbalogh
jbalogh / README.md
Last active December 18, 2015 17:39
@jbalogh
jbalogh / gist:5155003
Created March 13, 2013 18:54
user style for humbughq.com
.message_list {
background-color: transparent !important;
}
.recipient_row {
border: none !important;
}
.recipient_row .left_part {
background-color: transparent !important;
}
@jbalogh
jbalogh / 1-simple.js
Created January 30, 2012 19:38
push notifications API
var notification = (navigator.notification ||
navigator.mozNotification ||
navigator.webkitNotification);
if (notification) {
// Ask the user to allow notifications.
var request = notification.requestRemotePermission();
request.onsuccess = function() {
var url = request.result;
console.log('New push URL: ' + url);
// We got a new push URL, store it on the server.
@jbalogh
jbalogh / amodeploy.py
Created May 19, 2011 19:06 — forked from oremj/amodeploy.py
amo deploy using commander
import os
from commander.deploy import hostgroups, local_command
AMO_DIR = "/data/amo_python/src/prod/zamboni"
_amo_dir = lambda *p: os.path.join(AMO_DIR, *p)
_git_lcmd = lambda ctx, c: ctx.local("/usr/bin/git %s" % c)
@jbalogh
jbalogh / django-tutorial.sh
Created April 8, 2011 03:00
Install all the tools you need to get playdoh set up.
# pip is a tool for installing Python packages.
sudo easy_install pip
# Essential tools for any self-respecting Python programmer.
sudo pip install virtualenv virtualenvwrapper ipython
# This is where we keep Python environments.
mkdir ~/.virtualenvs
# Set up our shell for virtualenvwrapper.
@jbalogh
jbalogh / _recommend.c
Created April 7, 2011 19:46
C extension for calculating addon recommendations
#include <Python.h>
PyObject *array, *ArrayType;
/* Specialized _symmetric_diff_count for array.array() objects.
* We get to skip all the GC and rich comparison functions since array()
* stores C types directly.
*
* This calculates len(set(xs).symmetric_difference(ys)) without the
* extra data structures in between. xs and ys must be sorted in
@jbalogh
jbalogh / nginx.conf
Created March 21, 2011 18:34
nginx.conf for serving glow
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
#!/usr/bin/env python
"""
Usage:
git log next..master --oneline | milestones.py
git cherry next master -v | milestones.py
Requirements:
pip install termcolor