Skip to content

Instantly share code, notes, and snippets.

View philwhln's full-sized avatar

Phil Whelan philwhln

View GitHub Profile
@sidupadhyay
sidupadhyay / sample.config
Created June 7, 2011 05:27
Sample HA Proxy Config for Tornado/Socket.io Backends
global
maxconn 10000 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
@alkema
alkema / elasticsearch.sh
Created August 11, 2011 16:49
install elasticsearch on ubuntu
sudo apt-get install unzip
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.4.zip
unzip elasticsearch-0.17.4.zip
sudo apt-get install python-software-properties
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo mv elasticsearch-0.17.4 /usr/local/share
cd elasticsearch-servicewrapper
sudo mv service /usr/local/share/elasticsearch-0.17.4/bin
@joerussbowman
joerussbowman / gist:1176002
Created August 27, 2011 23:29
Tornado Twitter Stream
# not pretty, I quickly moved to another idea
# not involving the Twitter stream. Good starting
# point.
import re
import base64
import socket
import asyncmongo
from tornado import ioloop
from tornado import iostream
@srid
srid / stackato-dev.bash
Created April 4, 2012 17:47
stackato dev vm helper functions
# stackato repo
alias s=~/as/vmc-tcl/bin/stackato
export STACKATO_SSH_OPTS=-4
function vm-target {
H=stackato-$1.local
s target api.$H
}

Docker Overview

こんな人に有効

  • Linux 使ってるけど vagrant とか Virtual Box とか時間かかってめんどい
  • VM 作りまくって何が何だかわからなくなった
  • Warden が動かない, Buildpack なにそれおいしいの?
  • Go!

note: Ubuntu 12.04 (linux-image-3.8.0-23-generic) 使ってます。 Kernel 3.5 以前では安定しない模様。

@homingli
homingli / autoscale-on-cpu.py
Created July 31, 2013 19:09
Python scripts used in ActiveState webinar "Advanced Scaling Techniques with PaaS"
from stackato.interfaces import StackatoInterface
from bs4 import BeautifulSoup
import requests
import yaml
CREDENTIALS = yaml.load(open('credentials.yml'))
APP_NAME = 'your-app-name'
NEW_RELIC_USER_ID = 'your-user-id'
NEW_RELIC_APPLICATION_ID = 'your-app-id'