Skip to content

Instantly share code, notes, and snippets.

Eduard Siebert eddiesel

View GitHub Profile
View unicorn.rb
# Sample verbose configuration file for Unicorn (not Rack)
# This configuration file documents many features of Unicorn
# that may not be needed for some applications. See
# for a much simpler configuration file.
# See for complete
# documentation.
View uri_validator.rb
require 'addressable/uri'
# Source:
# Accepts options[:message] and options[:allowed_protocols]
# spec/validators/uri_validator_spec.rb
class UriValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
uri = parse_uri(value)
if !uri
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
eddiesel / ruby_ftp_example.rb
Created Aug 16, 2012 — forked from 3dd13/ruby_ftp_example.rb
Sample code of using Ruby Net::FTP library. Login to FTP server, list out files, check directory existence, upload files
View ruby_ftp_example.rb
require 'net/ftp'
CONTENT_SERVER_FTP_LOGIN = "saucy-ftp-server-login"
CONTENT_SERVER_FTP_PASSWORD = "saucy-ftp-server-password"
# LOGIN and LIST available files at default home directory, CONTENT_SERVER_FTP_LOGIN, CONTENT_SERVER_FTP_PASSWORD) do |ftp|
files = ftp.list
eddiesel /
Created Aug 13, 2012 — forked from trey/
Installing GetBundles on a Fresh Copy of TextMate

Installing GetBundles on a Fresh Copy of TextMate

$ mkdir -p ~/Library/Application\ Support/TextMate/Bundles
$ cd !$
$ svn co
$ osascript -e 'tell app "TextMate" to reload bundles'


eddiesel / gist:2492856
Created Apr 25, 2012 — forked from sghael/gist:896445
Capistrano recipe for multi-stage deployment running Passenger standalone
View gist:2492856
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
# REPLACE this below with your ruby version/gemset version: YOUR_RUBY_VERSION@YOUR_GEM_SET
set :rvm_ruby_string, 'ruby-1.9.2-p136@example_gemset'
set :use_sudo, false
set :stages, %w(production staging)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
eddiesel / Capistrano-Deployment-Recipe.rb
Created Mar 19, 2012 — forked from mrrooijen/Capistrano-Deployment-Recipe.rb
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
View Capistrano-Deployment-Recipe.rb
# Guide
# Configure the essential configurations below and do the following:
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
# Initial Deployment:
You can’t perform that action at this time.