see also http://www.zeromq.org/bindings:php
wget http://www.zeromq.org/local--files/area:download/zeromq-2.0.9.tar.gz
tar zxf zeromq-2.0.9.tar.gz
cd zeromq-2.0.9
./configure
make && make install
cd ..
| #!/usr/bin/env ruby -w | |
| ## Using ruby's standard OptionParser to get subcommand's in command line arguments | |
| ## Note you cannot do: opt.rb help command | |
| ## other options are commander, main, GLI, trollop... | |
| # run it as | |
| # ruby opt.rb --help | |
| # ruby opt.rb foo --help | |
| # ruby opt.rb foo -q | |
| # etc |
see also http://www.zeromq.org/bindings:php
wget http://www.zeromq.org/local--files/area:download/zeromq-2.0.9.tar.gz
tar zxf zeromq-2.0.9.tar.gz
cd zeromq-2.0.9
./configure
make && make install
cd ..
| VERSION=5.4.1 | |
| DOWNLOAD=http://apache.cs.utah.edu/activemq/apache-activemq/$(VERSION)/apache-activemq-$(VERSION)-bin.tar.gz | |
| NAME=apache-activemq | |
| TARBALL=$(NAME)-$(VERSION)-bin.tar.gz | |
| BUILDDEPS= | |
| RUNDEPS=java-runtime | |
| #CFLAGS=-g | |
| .PHONY: default |
| #!/usr/bin/env python | |
| import MySQLdb | |
| import os, sys | |
| import pprint | |
| pp = pprint.PrettyPrinter() | |
| mysql_host = "localhost" | |
| mysql_user = "dbusername" | |
| mysql_pass = "dbpassword" |
| #!/usr/bin/env ruby | |
| #/ Usage: <progname> [options]... | |
| #/ How does this script make my life easier? | |
| # ** Tip: use #/ lines to define the --help usage message. | |
| $stderr.sync = true | |
| require 'optparse' | |
| # default options | |
| flag = false | |
| option = "default value" |
| # Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference. | |
| # The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2 | |
| # Step 0: Check what is going on at port 80 | |
| $ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c | |
| # Step 1: Increase the number of available fds | |
| $ ulimit -n 32000 | |
| # Step 2: Restart your webserver, for me: |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| #! /usr/bin/env python | |
| import redis | |
| import random | |
| import pylibmc | |
| import sys | |
| r = redis.Redis(host = 'localhost', port = 6389) | |
| mc = pylibmc.Client(['localhost:11222']) |
| #!/bin/bash | |
| # doesn't remove packages. just beginning/sharing script for the install. | |
| if [ -e /etc/redhat-release ]; then | |
| yum install -y gcc gcc-c++ make autoconf automake e2fsprogs-devel glibc-devel libuuid-devel | |
| elif [ -e /etc/debian_version ]; then | |
| apt-get install -y build-essential uuid-dev | |
| else | |
| echo "sorry, this script only installs on RedHat/CentOS or Debian/Ubuntu boxes" | |
| exit 2 |
In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:
Documentation
Accurate / up-to-date systems architecture diagram
Accurate / up-to-date network diagram
Out-of-hours support plan
Incident management plan