Skip to content

Instantly share code, notes, and snippets.

View joshaven's full-sized avatar

Joshaven Potter joshaven

View GitHub Profile
@joshaven
joshaven / vash.rb
Created September 10, 2009 21:19
Volatile Ruby Hash > Vash
#############################################################################
# Class: Vash (Ruby Volatile Hash)
# Hash that returns values only for a short time. This is useful as a cache
# where I/O is involved. The primary goal of this object is to reduce I/O
# access and due to the nature of I/O being slower then memory, you should also
# see a gain in quicker response times.
#
# For example, if Person.first found the first person from the database & cache
# was an instance of Vash then the following would only contact the database for
# the first iteration:
@joshaven
joshaven / .irbrc
Created October 22, 2009 19:51
launch many ruby projects by typing 'irb' from the root dir of the project
#!/usr/bin/ruby
# Save this file as .irbrc in the root of your home directory... This will allow
# you to load multiple different enviroments by simply typing 'irb' from your console.
#
# This file includes tab compleation and irb history.
#
# For example, after saving this file you can:
# type: irb instead of ./script/console
# type: irb instead of irb (followed by "require 'lib/init.rb'")
From e5ae5bb8495ce28f8ac150bf340a3ce42d2ff34f Mon Sep 17 00:00:00 2001
From: Joshaven Potter <yourtech@gmail.com>
Date: Tue, 15 Dec 2009 22:05:01 -0500
Subject: [PATCH] fix issue when S3Object is compaired to another type of object using the == method and associated test
---
lib/aws/s3/object.rb | 2 +-
test/object_test.rb | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
From 3541168430e8274780258de54e992a7d274932f3 Mon Sep 17 00:00:00 2001
From: Joshaven Potter <yourtech@gmail.com>
Date: Wed, 16 Dec 2009 17:33:33 -0500
Subject: [PATCH] syntax fixes in src/node.js
---
src/node.js | 61 ++++++++++++++++++++++++++++++-----------------------------
1 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/src/node.js b/src/node.js
From e54079d5fabb377844da4a3b08b501f75890504c Mon Sep 17 00:00:00 2001
From: Joshaven Potter <yourtech@gmail.com>
Date: Wed, 30 Dec 2009 13:45:49 -0500
Subject: [PATCH] Fix issue with dependency on .bash_profile
---
bin/install | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/bin/install b/bin/install
joshaven: ~/projects$ cilantro new app
This project does not have a bin/cilantro installed!
HEAD is now at 71898e8 Changed the order of arguments when creating actions with named routes.
Run 'git remote add origin ...' to add an origin for your project. Or if running on linode, simply run 'linode add domain.com'
Whenever the cilantro project is updated, you can keep up to date by running 'cilantro update'
joshaven: ~/projects$ cd app
joshaven: ~/projects/app$ cilantro update
From git://github.com/dcparker/cilantro
* branch cilantro -> FETCH_HEAD
error: could not lock config file .git/config: No such file or directory
From e5d5ee1cafe47b93dfa604954a6c3cc82a9fad9e Mon Sep 17 00:00:00 2001
From: Joshaven Potter <joshaven@Joshaven-Potters-MacBook-Pro.local>
Date: Thu, 4 Mar 2010 22:45:47 -0500
Subject: [PATCH] Add the following matchers: :be_one_of, :be_in, & :be_part_of
---
lib/spec/matchers.rb | 1 +
lib/spec/matchers/be_one_of.rb | 46 +++++++++++++++++++++++++++++++++++++++
spec/spec/matchers/be_one_of.rb | 42 +++++++++++++++++++++++++++++++++++
3 files changed, 89 insertions(+), 0 deletions(-)
gemhome: ./gems
gempath:
- ./gems
gem: --no-rdoc --no-ri
if File.directory?("#{RAILS_ROOT}/gems")
Gem.use_paths("#{RAILS_ROOT}/gems", ["#{RAILS_ROOT}/gems"])
end
# Write me if you want my full implementation (it is not for RAILS but it could be easily re-written)
# yourtech at gmail dot com
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fastcgi
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop php-cgi in external FASTCGI mode
# Description: Start and stop php-cgi in external FASTCGI mode
### END INIT INFO