Skip to content

Instantly share code, notes, and snippets.

View rkive's full-sized avatar

Aaron Bento rkive

  • Portland, OR
View GitHub Profile
@rkive
rkive / keybase.md
Created May 17, 2014 15:11
Keybase proof

Keybase proof

I hereby claim:

  • I am rkive on github.
  • I am rkive (https://keybase.io/rkive) on keybase.
  • I have a public key whose fingerprint is F084 BDB6 BCCB 550A 592C 8EB0 34AC 9E13 7511 0649

To claim this, I am signing this object:

#!/bin/bash
sudo apt-get update
sudo apt-get install git build-essential
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
. ~/.bash_profile
#!/bin/bash
pushd .
cd /tmp/
hostname_component=$(hostname -f | sed -E 's/^\w+-(\w+).*/\1/')
case $hostname_component in
staging)
@rkive
rkive / asset-precompile duplicates
Created February 5, 2013 17:07
When doing the pre-compile step of our deploy, we compile all assets twice. This is the output that has been sorted and blank lines removed.
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: Jcrop.gif
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: about/food1.jpg
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: about/food1.jpg
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: about/food2.jpg
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: about/food2.jpg
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: about/food3.jpg
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: about/food3.jpg
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: additional-section-bg.png
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: additional-section-bg.png
** [out :: ce-build-east-appserver-i-12395e62.build-east.cityeats.com] Compiling: admin-print.css
@rkive
rkive / rds-test.coffin
Created August 24, 2012 18:14
Coffin template showing duplicate keys are not created in coffin compile
## Cloudformation Description Resource
@Description "A simple MySQL RDS test stack"
@Param.String 'home1', Default: '192.168.0.1/32'
@Param.String 'home2', Default: '192.168.0.2/32'
## Expected: This SecurityGroup should have two entries with IP addresses and two entries with EC2 Securitygroup names within DBSecurityGroupIngress.
## Acctual Result: Only the last item if the duplicate key is in the compiled JSON.
@AWS.RDS.DBSecurityGroup "ec2instances",
@rkive
rkive / redis.markdown
Created July 23, 2012 00:38 — forked from bdotdub/redis.markdown
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@rkive
rkive / centos6-cloud.yaml
Created March 18, 2012 23:56
Base CentOS 6.x + Chef 0.10.x + Cloud-init 0.5.15 + runurl
name: centos6-cloud
summary: Base CentOS 6 + Chef 0.10.x + Cloud-init 0.5.15 + runurl
version: 1
os:
name: centos
version: 6
hardware:
partitions:
"/":
size: 10
@rkive
rkive / stacks.rb
Created March 1, 2012 23:42
Personal Fog experiments
#!/usr/bin/env ruby
require 'rubygems'
require 'mixlib/cli'
require 'fog'
require 'chef/search/query'
require 'chef/knife'
class Stacks
@rkive
rkive / en_cluster_partitions.rb
Created March 1, 2012 00:47
Generate a Voldemort partition scheme for a given size of cluster.
#!/usr/bin/env ruby
#
# gen_cluster_partitions.rb
# Generate a Voldemort partition scheme for a given size of cluster.
#
usage = "Usage: gen_cluster_partitions.rb <name of cluster> < # of cluster nodes> < # of partitions per node>"
if ARGV[0]
cluster_name = ARGV[0]
else
@rkive
rkive / runChefSolo.sh
Created February 17, 2012 21:29
Remotely push chef-solo and run it.
#!/bin/bash
# runChefSolo.sh
# Author: abento+github@gmail.com
# Setup a set of cookbooks using chef-solo on a remote machine.
hostname=""
domain=""
cookbook_root="."
file_root="./provisioning/chef-solo"