Skip to content

Instantly share code, notes, and snippets.

View ariejan's full-sized avatar

Ariejan de Vroom ariejan

View GitHub Profile
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
# lib/monkey.rb
module Authlogic
module ControllerAdapters
class RailsAdapter
def cookie_domain
#cookie domain can be found in ApplicationController
controller.cookie_domain
end
end
end
package suncertify.db;
/**
* An interface implemented by classes that allow access to the
* bookings database.
*
* @author Sun Microsystems
* @version 1.0
*/
public interface DBMain {
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nl.kabisa.mgl.rssninja.beans;
import java.io.IOException;
import java.util.Date;
import java.util.logging.Level;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nl.kabisa.mgl.rssninja.beans;
import java.io.IOException;
import java.util.Date;
import java.util.logging.Level;
@ariejan
ariejan / doctor.txt
Created May 6, 2011 09:33
Problem installing git 1.7.5.x
λ brew doctor
Some "config" scripts were found in your path, but not in system or Homebrew folders.
`./configure` scripts often look for *-config scripts to determine if software packages
are installed, and what additional flags to use when compiling and linking.
Having additional scripts in your path can confuse software installed via Homebrew if
the config script overrides a system or Homebrew provided script of the same name.
/Users/ariejan/.rvm/gems/ruby-1.8.7-p249/bin
@ariejan
ariejan / install.txt
Created May 12, 2011 08:04
Location of `install`
ruby-1.8.7-p249 ~ λ which install
/usr/local/bin/install
ruby-1.8.7-p249 ~ λ cd /usr/local/bin
ruby-1.8.7-p249 /usr/local/bin master λ ls -lah install*
lrwxrwxrwx 1 ariejan staff 15B 20 Apr 13:08 install -> ./[email protected]
lrwxrwxrwx 1 ariejan staff 51B 20 Apr 13:08 [email protected] -> ../lib/node/.npm/brequire/0.0.5/package/bin/install
ruby-1.8.7-p249 /usr/local/bin master λ
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Falcon::Application.load_tasks
@ariejan
ariejan / gist:1203579
Created September 8, 2011 14:47 — forked from brianjlandau/gist:176754
Rails Capistrano deploy using git as our deployment strategy. You'll need git version >=1.5.6.6 on your server for this to work.
# you'd obviously have more settings somewhere
set :scm, :git
set :repository, "[email protected]:defunkt/github.git"
set :branch, "origin/master"
set :migrate_target, :current
set :use_sudo, false
set :ssh_options, {:forward_agent => true}
set :rails_env, 'production'
set(:latest_release) { fetch(:current_path) }
@ariejan
ariejan / content.rb
Created October 12, 2011 10:43
Some useful content-related methods (summaries, markdown, syntax highlighting)
require 'rdiscount'
require 'nokogiri'
require 'coderay'
module Falcon
class Content
# Return a summary if a delimiter is found, otherwise
# return the full body.
def self.summary_of(text, delimiter = "~\n")
summary = if text =~ /#{delimiter}/i