Skip to content

Instantly share code, notes, and snippets.

View rootart's full-sized avatar
🎯
Focusing

Vasyl Dizhak rootart

🎯
Focusing
View GitHub Profile
@rootart
rootart / fabfile.py
Created February 1, 2010 21:38 — forked from heckj/fabfile.py
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'
#!/usr/bin/python
#
# Author: Chris Reid
# chris.reid@suite101.com
#
# Memcache monitoring plugin for server density
# http://www.serverdensity.com/
#
# Depends on python-memcached
# http://www.tummy.com/Community/software/python-memcached/
@rootart
rootart / proxy_nginx.sh
Created May 27, 2012 08:37 — forked from rdegges/proxy_nginx.sh
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
from django.db import connection
from django.utils.log import getLogger
logger = getLogger(__name__)
class QueryCountDebugMiddleware(object):
"""
This middleware will log the number of queries run
and the total time taken for each request (with a
status code of 200). It does not currently support

Steps to install PIL

$ sudo apt-get install python-imaging
$ sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
$ sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/

$ pip install PIL

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
app: {
'root': 'app',
import logging
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from nameko.runners import ServiceRunner
from nameko_sqlalchemy import DB_URIS_KEY
from nameko_sqlalchemy import Session
from nameko.rpc import rpc

Keybase proof

I hereby claim:

  • I am rootart on github.
  • I am rootart (https://keybase.io/rootart) on keybase.
  • I have a public key whose fingerprint is 2DA4 A2C7 D9DC 265A 3A10 E57A FCFB 2E3C 0C6A 236E

To claim this, I am signing this object: