Skip to content

Instantly share code, notes, and snippets.

View akoumjian's full-sized avatar

Alec Koumjian akoumjian

View GitHub Profile
@zefer
zefer / Install_nginx_from_src_with_module.sh
Created February 16, 2011 12:26
Compile nginx from source, include the Headers More module - Ubuntu
sudo su -
# stuff we need to build from source
apt-get install libpcre3-dev build-essential libssl-dev
# get the nginx source
cd /opt/
wget http://nginx.org/download/nginx-0.8.54.tar.gz
tar -zxvf nginx*
# we'll put the source for nginx modules in here
@ltudury
ltudury / inputDiscovery.py
Created January 18, 2012 00:55
Automatic Device Discovery
import json
import sys
import urllib2
'''
Auto-authenticate Syslog TCP inputs.
Usage: python inputs.py -u user -p pass -s subdomain
'''
state = None
@chooper
chooper / statsd_instrument.py
Created March 11, 2012 22:04
Decorator to quickly add statsd (graphite) instrumentation to Celery task functions.
"""Decorator to quickly add statsd (graphite) instrumentation to Celery
task functions.
With some slight modification, this could be used to instrument just
about any (non-celery) function and be made abstract enough to customize
metric names, etc.
Stats reported include number of times the task was accepted by a worker
(`started`), the number of successes, and the number of times the task
raised an exception. In addition, it also reports how long the task took
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@baijum
baijum / gist:3025019
Created June 30, 2012 18:41
Salt Development Environment
## Get OS/build dependancies
$ sudo apt-get install python2.7-dev build-essential libtool autoconf automake swig uuid-dev python-m2crypto
## Download 0MQ
$ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
## Unpack
$ tar -xvzf zeromq-2.2.0.tar.gz
## CD into dir
@akoumjian
akoumjian / gist:3156940
Created July 21, 2012 19:45 — forked from baijum/gist:3025019
Salt Development Environment
## Get OS/build dependancies
$ sudo apt-get install python2.7-dev build-essential libtool autoconf automake swig uuid-dev python-m2crypto python-setuptools
## Download 0MQ
$ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
## Unpack
$ tar -xvzf zeromq-2.2.0.tar.gz
## CD into dir
@msievers
msievers / example.gemspec
Created September 27, 2012 08:19
Gemspec which includes files from git submodules into resulting gem
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/example/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["John Doe"]
gem.email = ["john_doe@example.org"]
gem.description = %q{Write a gem description}
gem.summary = %q{Write a gem summary}
gem.homepage = ""
@jshaw
jshaw / byobuCommands
Last active July 4, 2024 10:58
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@ispedals
ispedals / video-thumbnail-display.html
Created May 20, 2013 16:19
Experiment creating thumbnails of MP4 videos using the HTML5 Filereader API. Currently, the loading of videos in rapid succession fails with a decoding error, and if too many videos are processed concurrently, the display driver crashes.
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="https://rawgithub.com/caolan/async/master/lib/async.js"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script>
window.URL = window.URL || window.webkitURL;
@kerryrodden
kerryrodden / README.md
Last active January 18, 2021 11:05
Zoomable sunburst with updating data

I combined Mike Bostock's Zoomable Sunburst and Sunburst Partition examples, so that I could have both zooming and updating the underlying data (between count and size, in this case). A simple combination of the examples does not work; you have to edit the arcTween function used for updating the data, so that when it redraws the partition layout, it takes account of the current zoom level by adjusting the domain of the x scale.

Click on any arc to zoom in, and click on the center circle to zoom out. Use the Size/Count radio buttons to update the data.