Skip to content

Instantly share code, notes, and snippets.

View jwreagor's full-sized avatar

J R jwreagor

  • New Gillington, WI
View GitHub Profile
require 'rubygems'
require 'guid'
seed = Guid.new.hexdigest
# the end
#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'rubygems'
require 'dm-core'
require 'pp'
module DataMapper
class Collection
require 'rubygems'
require 'dm-core'
require 'dm-types'
require 'bacon'
DataMapper.setup :default, :adapter => :in_memory
class User
include DataMapper::Resource
property :id, Serial
set :git_tagging, true
set :tag_stamp, Time.now.strftime("%Y%m%d%H%M%S")
set :tag_name, ENV['TAG'] || "#{tag_stamp}-REL-#{rails_env}"
desc 'Git related recipes'
namespace :git do
desc 'pulls down submodules after performing a deployment'
task :submodules do
run "cd #{deploy_to}/current &&
require '../lib/flag_shih_tzu'
require 'rubygems'
require 'activerecord'
require 'sqlite3'
require 'irb'
ActiveRecord::Base.logger = Logger.new File.dirname(__FILE__) + "/perms.log"
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'perms.db'
ActiveRecord::Schema.define :version => 0 do
@jwreagor
jwreagor / Gemfile
Created January 18, 2010 17:23 — forked from lifo/Gemfile
gem 'cramp'
gem 'erubis', '2.6.5'
gem 'usher', "0.6.0"

Setting up Capybara (w/ @culerity support) using rvm

The following steps will setup ruby 1.8.7-p174 as well as the gems required for Capybara and Culerity support. It will also install Celerity using macports-managed JRuby. Note: sudo is not used.

Steps: $ rvm install 1.8.7-p174 $ rvm 1.8.7-p174 $ gem install rails cucumber capybara webrat rspec cucumber-rails email_spec database_cleaner rspec-rails factory_girl clearance formtastic sqlite3-ruby pg thin mongrel paperclip will_paginate ZenTest autotest-rails culerity $ rvm jruby-1.4.0 $ gem install celerity

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.hclnet.redis</string>
<key>Program</key>
<string>/usr/bin/redis-server</string>
<key>ProgramArguments</key>
<array>
#! /bin/sh
CUR_DIR=$PWD
PID_FILE="$CUR_DIR/node.pid"
if [ $1 = "start" ]; then
if [ -e $PID_FILE ]; then
echo "Node.js is already running."
else
echo "Starting Node Server"
function modified_tb_init(domChunk, opennow) {
var $button = $(domChunk);
var t = null;
// var a = $button.attr('data-href');
var g = false;
$button.click(function() {
tb_show(t, $(this).attr('data-href'), g);
this.blur();
return false;