This gist is a collection of my rough notes from Strange Loop 2012.
Follow me on Twitter to get updates as they're posted.
I'm posting these notes immediately after each talk. Expect typos, formatting glitches, incomplete thoughts, and ...
# Documentation for HAProxy | |
# http://code.google.com/p/haproxy-docs/w/list | |
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt | |
# NOTES: | |
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems) | |
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice |
This gist is a collection of my rough notes from Strange Loop 2012.
Follow me on Twitter to get updates as they're posted.
I'm posting these notes immediately after each talk. Expect typos, formatting glitches, incomplete thoughts, and ...
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
$ mongo --port 4000 | |
MongoDB shell version: 2.0.2 | |
connecting to: 127.0.0.1:4000/test | |
PRIMARY> db.test.insert({'foo':'bar'}) | |
PRIMARY> use local | |
PRIMARY> db.oplog.rs.find().sort({$natural:-1}) | |
{ "ts" : { "t" : 1329058902000, "i" : 1 }, "h" : NumberLong("-9209932462579884476"), "op" : "i", "ns" : "test.test", "o" : { "_id" : ObjectId("4f37d45611558d5848a3d21a"), "foo" : "bar" } } | |
# On Heroku | |
# Create dump file | |
heroku pgbackups:capture --app <application_name> | |
# On Engine Yard slice | |
# Get dump file from heroku | |
curl -o latest.dump `heroku pgbackups:url b005 --app <application_name> -e <environment>` | |
# drop and recreate database | |
bundle exec rake db:drop |
postgres=# \dx | |
List of installed extensions | |
Name | Version | Schema | Description | |
---------+---------+------------+------------------------------ | |
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language | |
(1 row) | |
postgres=# \dx+ | |
Objects in extension "plpgsql" | |
Object Description |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
# This script will generate the commands used to preshard a collection | |
# in mongodb. | |
# | |
# See: | |
# http://www.mongodb.org/display/DOCS/Splitting+Chunks |
tm99-s00026 ~ # sm --debug=mongodb mongodb configure | |
DEBUG mongodb: config path: /opt/sm/pkg/active/config/mongodb.conf | |
tm99-s00026 ~ # sm --debug=mongodb --force mongodb makedefaultconfig force | |
DEBUG mongodb: default config path: /etc/conf.d/mongodb.conf | |
tm99-s00026 ~ # cat /etc/conf.d/mongodb.conf | |
# Mongodb essentials | |
# MONGODB_EXEC="/opt/sm/pkg/active/bin/mongod" | |
# MONGODB_DATA="/db/mongodb/active/data" | |
# MONGODB_LOG="/etc/conf.d/mongodb.conf" | |
# MONGODB_USER="mongodb" |
tm99-s00026 sm_mongodb # cat /etc/conf.d/mongodb/mongodb.conf | |
#!/bin/sh | |
# | |
# /etc/conf.d/mongodb | |
# | |
# Mongodb essentials | |
MONGODB_EXEC="/mongod" |
module DataMapper | |
module Adapters | |
class ConnectionPoolAdapter < AbstractAdapter | |
def initialize(name, options) | |
super | |
assert_kind_of 'options', @options[:pool], Array | |
raise ArgumentError, "The are no adapters in the adapter pool" if @options[:pool].empty? |