Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gist:4258042
Created December 11, 2012 12:01
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
@osdrv
osdrv / .vimrc
Created May 2, 2012 20:19
my vim config
set guifont=Monaco:h14
"set bg=dark
set ts=2
set sw=2
set sts=2
set expandtab
set nu nu
set syntax=on
highlight clear
syntax reset
@ryanlecompte
ryanlecompte / gist:1619490
Created January 16, 2012 06:59
Experimenting with forking and unix sockets in Ruby
require 'base64'
require 'socket'
require 'fileutils'
# UnixSocketForker is an experiment of inter-process communication using
# plain unix sockets to communicate between forked processes and the
# parent process. This can also be done via IO.pipe. In this experiment,
# the jobs are simply random arrays whose sums are calculated in the forked
# worker processes.
class UnixSocketForker
@bobuk
bobuk / speetter.py
Created October 20, 2011 13:27
Говорилка
# -*- coding: utf-8 -*-
import sys;reload(sys);sys.setdefaultencoding('utf-8')
import twitter
import time
import commands, itertools
consumer_key = ...
consumer_secret = ...
access_key = ...
@tbeseda
tbeseda / gist:1096141
Created July 20, 2011 23:05
Cakefile to watch and recursively concat and compile CoffeeScript automatically.
fs = require 'fs'
{exec} = require 'child_process'
util = require 'util'
growl = require 'growl'
appFiles = [
'src/hasToGoFirst.coffee' # put your files that must be loaded in first into the array
'src/notAsImportantButNeedsToGoBeforeTheRest.coffee'
]
@msantos
msantos / unix_dgram1.erl
Created December 25, 2010 12:16
Erlang Unix datagram socket
-module(unix_dgram1).
-export([client/1, server/0]).
-define(PF_LOCAL, 1).
-define(SOCK_DGRAM, 2).
-define(UNIX_PATH_MAX, 108).
-define(PATH, <<"/tmp/unix_dgram.sock">>).
server() ->
@lxneng
lxneng / gist:741932
Created December 15, 2010 13:21
install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql