Skip to content

Instantly share code, notes, and snippets.

View swaroopch's full-sized avatar

Swaroop CH swaroopch

View GitHub Profile
@xjamundx
xjamundx / gist:911831
Created April 9, 2011 22:14
simple mongo collection with mongohq
~ $ mongo -u USERNAME -p PASSWORD Flame.mongohq.com:27094/wereviewutah
MongoDB shell version: 1.6.5
connecting to: Flame.mongohq.com:27094/wereviewutah
> db.logs.find()
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 1 }
> db.logs.findOne()
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 1 }
> db.logs.update({}, {$inc:{count:1}})
> db.logs.findOne()
{ "_id" : ObjectId("4da0d8a5a130714ae1000023"), "count" : 2 }
@stefanfoulis
stefanfoulis / osx_developer_installation.rst
Last active April 17, 2025 04:50
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Brew User

@jdmaturen
jdmaturen / worker3.py
Created January 25, 2011 03:42
Redis stats aggregator w/ Gevent
import gevent
from gevent import monkey
monkey.patch_socket()
import hashlib
import os
import redis
@swaroopch
swaroopch / flask-boilerplate-tmux.bash
Created December 5, 2010 07:00
A command that scripts a tmux session
#!/bin/bash
function flask-boilerplate-tmux
{
# https://github.com/swaroopch/flask-boilerplate
BASE="$HOME/code/flask-boilerplate"
cd $BASE
tmux start-server
tmux new-session -d -s flaskboilerplate -n model
set grepprg=ack
set grepformat=%f:%l:%m
autocmd FileType make set noexpandtab
autocmd FileType python set noexpandtab
set hlsearch
let mapleader = ","