Skip to content

Instantly share code, notes, and snippets.

source :rubygems
gem 'json'
gem 'rake', :require => ['rake/testtask']
gem 'rake-compiler', :require => ['rake/extensiontask', 'rake/javaextensiontask']
gem 'activesupport'
group :deploy do
gem 'git'
gem 'yard'
@TylerBrock
TylerBrock / 0-readme.md
Created November 26, 2012 13:49 — forked from burke/0-readme.md
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@TylerBrock
TylerBrock / gemspec-usage.md
Created November 8, 2012 01:47 — forked from holman/gemspec-usage.md
test/spec/mini

Just install this in your apps like so:

gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'

@TylerBrock
TylerBrock / rbenv-install-system-wide.sh
Created September 21, 2012 14:14 — forked from jnx/rbenv-install-system-wide.sh
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:
@TylerBrock
TylerBrock / gist:3761635
Created September 21, 2012 14:03 — forked from olistik/gist:2627011
Ubuntu 12.04 setup (rbenv, janus, postgres)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git
  • Copy/paste from the command line:
sudo apt-get install xclip
@TylerBrock
TylerBrock / Gemfile
Created September 19, 2012 04:12
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin
@TylerBrock
TylerBrock / mac-app.rb
Created September 12, 2012 18:14 — forked from havenwood/mac-app.rb
Create an OS X .app Executable With Your Choice Of Language For Script
require 'builder'
module MacApp
class << self
def new
ask_name
ask_file_extension
ask_language
create_directories
class Monitor
def initalize
puts "whatup"
@thread = Thread.new {
loop do
puts "ReplSetMonitor refreshing!"
sleep(1)
end
}
end
require 'mongo'
require './model/mongoModule'
require './model/user'
if ENV['RACK_ENV'] == 'production'
CONNECTION = Mongo::Connection.from_uri(ENV['MONGOHQ_URL'])
else
CONNECTION = Mongo::Connection.new("localhost", 27017)
end
DB = CONNECTION.db('milieu')
@TylerBrock
TylerBrock / log
Created July 4, 2012 17:29
MongoDB v2.1.2 fsyncUnlock()
Wed Jul 4 13:23:37 [conn1587] end connection 127.0.0.1:50894 (5 connections now open)
Wed Jul 4 13:23:37 [conn1581] end connection 127.0.0.1:50888 (4 connections now open)
Wed Jul 4 13:23:37 [conn1589] end connection 127.0.0.1:50896 (3 connections now open)
Wed Jul 4 13:23:37 [conn1591] end connection 127.0.0.1:50898 (2 connections now open)
Wed Jul 4 13:23:42 [conn59] CMD fsync: sync:1 lock:1
Wed Jul 4 13:23:43 [fsyncLockWorker] removeJournalFiles
Wed Jul 4 13:23:43 [conn59] db is now locked for snapshotting, no writes allowed. db.fsyncUnlock() to unlock
Wed Jul 4 13:23:43 [conn59] For more info see http://www.mongodb.org/display/DOCS/fsync+Command
Wed Jul 4 13:23:43 [conn59] command admin.$cmd command: { fsync: 1.0, lock: true } ntoreturn:1 keyUpdates:0 locks(micros) W:10958 r:1268 reslen:168 699ms
Wed Jul 4 13:23:44 [conn59] CMD fsync: sync:1 lock:1