Skip to content

Instantly share code, notes, and snippets.

@vertis
vertis / samba.3.6.3.osx-getgrouplist.patch
Created February 23, 2012 13:30 — forked from lasombra/samba.3.6.1.osx-getgrouplist.patch
_SC_NGROUPS_MAX cannot be used with getgrouplist on OS X
--- a/source3/lib/system.c 2012-02-22 22:46:14.000000000 -0200
+++ b/source3/lib/system.c 2012-02-22 22:47:51.000000000 -0200
@@ -1161,7 +1161,14 @@
int groups_max(void)
{
-#if defined(SYSCONF_SC_NGROUPS_MAX)
+#if defined(DARWINOS)
+ /* On OS X, sysconf(_SC_NGROUPS_MAX) returns 16
+ * due to OS X's group nesting and getgrouplist
@vertis
vertis / gauges_tracking.rb
Created March 2, 2012 01:53
Gauges tracking code in ruby
before_filter :track
...
private
def track
headers = request.headers
query = {"h" => {}}
query["h"]["site_id"]=Settings.gauges_site_id
query["h"]["resource"]="http://#{headers['HTTP_HOST']}/#{headers['REQUEST_PATH']}" # REQUEST_URI seems to be incorrect
@vertis
vertis / rbenv-install-system-wide.sh
Created May 4, 2012 10:19
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@vertis
vertis / rbenv-install-system-wide.sh
Created July 25, 2012 06:03 — forked from jpfuentes2/rbenv-install-system-wide.sh
CentOS: rbenv install and system wide install
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
@vertis
vertis / rbenv-install-system-wide.sh
Created August 9, 2012 03:29 — forked from v1nc3ntlaw/rbenv-install-system-wide.sh
rbenv install ruby 1.9.3-p194 on Debian 6 Squeeze
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
BOX_NAME=vagrant-build
BASE_DIR="`pwd`/machines"
BOX_DIR="${BASE_DIR}/${BOX_NAME}"
mkdir -p ${BASE_DIR}
VBoxManage createvm --name "${BOX_NAME}" --ostype RedHat_64 --basefolder ${BASE_DIR}
VBoxManage registervm "${BOX_DIR}/${BOX_NAME}.vbox"
mkdir -p tmp
@vertis
vertis / dependencies.sh
Created January 25, 2013 04:16
Generate gem dependencies. You need to have graphviz installed
#!/usr/bin/env bash
if [ $# -eq 0 ] ; then
printf "%s\n" "no args given, exiting"
exit 1
fi
export TMP_GEM_PATH=/tmp/$1
mkdir -p
GEM_HOME=$TMP_GEM_PATH GEM_PATH=$TMP_GEM_PATH gem install $1
GEM_HOME=$TMP_GEM_PATH GEM_PATH=$TMP_GEM_PATH gem list \
| cut -d\ -f1 \
Current state:
- README is the getting started point (it should be kept up to date)
- App server and LB server both work in vagrant (thanks to opscode + others)
- Orchestration support using capistrano has been added (instructions in readme)
- Opscode staff will be back as soon as the east coasters start coming in
- Getting EC2 provisioned and deployed is the current challenge
- Issues, tasks & questions on the github issues page
- Everything comes via a pull request
- Evan has given permission for the DB to be broken off into it's own host
- No rearchitecting till it reaches prod (we all want to)
@vertis
vertis / gist:4695805
Created February 2, 2013 02:28
Chef logs
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing file[/etc/apt/sources.list.d/nginx.list] action create (/home/vertis/chef/cookbooks/apt/providers/repository.rb line 112)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing package[nginx] action install (nginx::server line 9)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing service[nginx] action enable (nginx::service line 8)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing service[nginx] action start (nginx::service line 8)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] [2013-02-02T02:21:38+00:00] INFO: Processing template[nginx.conf] action create (nginx::configuration line 7)
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com]
** [out :: ec2-54-245-134-70.us-west-2.compute.amazonaws.com] =============
[4:20pm] evan: like the S3 keys
[4:20pm] claco: I prolly misunderstood
[4:20pm] claco: that's what I get for disappearing for a day
[4:20pm] evan: i'd like us to come up with something that works now
[4:20pm] evan: and we can change it later
[4:21pm] vertis: evan: yeah
[4:21pm] vertis: where are the S3 keys at this point
[4:21pm] claco: regardless, this process is always awesome given the end result
[4:21pm] evan: i've got them on my machine.