Skip to content

Instantly share code, notes, and snippets.

View alonisser's full-sized avatar

Alonisser alonisser

View GitHub Profile
@pcdinh
pcdinh / easy_install and MinGW
Created April 15, 2012 10:53 — forked from mmlin/easy_install and MinGW
Installing hg-git on Windows using MinGW
Here's how I installed hg-git on Windows using the MinGW compiler.
PREPARE
-------
- Install Python (http://www.activestate.com/activepython/downloads)
- Install the Python package manager, setuptools (http://pypi.python.org/pypi/setuptools)
- Install the MinGW installer (http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get/)
- Install the C compiler, MinGW gcc, and a utility, pexports, to help create the import library
def run_pg_fouine():
info = host_info[env.host_string]
db_name = info.tags.get('Name')
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
time.sleep(30)
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt')
run('gzip -f /tmp/pgfouine.txt')
@tsabat
tsabat / zsh.md
Last active October 10, 2025 00:44
Getting oh-my-zsh to work in Ubuntu
@doctyper
doctyper / desaturate.js
Created May 26, 2011 01:03
desaturate canvas image
// Usage:
// var ctx = canvas.getContext("2d");
// var data = desaturate(ctx);
// ctx.putImageData(data);
var desaturate = function (ctx) {
var imgData = ctx.getImageData(0, 0, dimension, dimension);
for (y = 0; y < dimension; y++) {
for (x = 0; x < dimension; x++) {