Skip to content

Instantly share code, notes, and snippets.

c-98-219-118-149:plumbingholes.com grantmichaels$ sudo gem install rest-client aws-s3
Password:
Successfully installed rest-client-1.0.3
Successfully installed xml-simple-1.0.12
Successfully installed aws-s3-0.6.2
3 gems installed
c-98-219-118-149:plumbingholes.com grantmichaels$ sudo gem install ey-flex --source http://gems.engineyard.com
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Successfully installed right_http_connection-1.2.4
c-98-219-118-149:recipes grantmichaels$ git add . && git commit -am "Custom logrotate for nginx"
[master 449e9ea] Custom logrotate for nginx
2 files changed, 26 insertions(+), 0 deletions(-)
create mode 100644 cookbooks/nginx_logrotate/recipes/default.rb
create mode 100644 cookbooks/nginx_logrotate/recipes/default.rb~
c-98-219-118-149:recipes grantmichaels$ ey-recipes
/Library/Ruby/Site/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem deprecated (>= 2.0.0) (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems.rb:261:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:296:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:295:in `each'
@grantmichaels
grantmichaels / license
Created January 27, 2010 14:32 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
#!/usr/bin/env ruby
require 'fileutils'
def fail!(msg = "Failure!")
puts(msg)
exit(1)
end
REPOSITORY_URL = 'git://github.com/plastictrophy/homebrew.git'
PACKAGE_URL = 'http://github.com/plastictrophy/homebrew/tarball/masterbrew'
echo "deb ftp://mir1.ovh.net/debian/ sid main contrib non-free" > /etc/apt/sources.list
echo "deb-src ftp://mir1.ovh.net/debian/ sid main contrib non-free" >> /etc/apt/sources.list
apt-get update
apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake liblibxml-ruby librspec-ruby zlib1g-dev libxml2-dev
gem sources -a http://gems.opscode.com
gem install jeweler merb-core cucumber uuidtools json libxml-ruby --no-ri --no-rdoc
mkdir ~/src
cd ~/src
git clone git://github.com/opscode/chef.git
git clone git://github.com/opscode/ohai.git
@grantmichaels
grantmichaels / Gemfile
Created February 1, 2010 21:04 — forked from rmanalan/.gems
gem 'rack-contrib', :git => 'git://github.com/rack/rack-contrib.git'
gem 'rack-rewrite'
root@localhost:~/garcon# ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.01
root@localhost:~/garcon# rvm list
rvm Rubies
<i> No system ruby found. </i>
sudo chown `whoami` ~/.erlang.cookie
sudo hg clone http://hg.basho.com/riak/
sudo chown -R `whoami` riak
cd riak
./rebar compile
./rebar compile generate
cd rel
cd riak
bin/riak console
bin/riak start
# Config for Nginx to act as a front-end for Riak
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc)
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_)
# Config is in /etc/nginx/sites-available/default or somewhere like that
# Set up load-balancing to send requests to all nodes in the Riak cluster
# Replace these IPs/ports with the locations of your Riak nodes
upstream riak_hosts {
server 127.0.0.1:8098;
;; this file is a walkthrough of Moustache features, a web framework for Clojure
;; http://github.com/cgrand/moustache/tree/master
;; Moustache allows to declare routes, apply middlewares and dispatch on http methods.
;; Moustache is compatible with all frameworks built on Ring, including Compojure
(ns demo
(:use net.cgrand.moustache)
(:require [ring.httpcore :as hc])) ;; hmmm Ring without servlets