Leave your answer in the comments!
Given this routes file:
Omg::Application.routes.draw do
match ':controller(/:action(/:id(.:format)))'
end
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
#! /usr/bin/env ruby | |
status = DATA.flock(File::LOCK_EX | File::LOCK_NB) | |
if status == 0 | |
puts "we have the lock..." | |
sleep | |
else |
# -------------------------------------------------------------------- | |
# An implementation of Kruskal's algorithm for generating mazes. | |
# Fairly expensive, memory-wise, as it requires memory proportional | |
# to the size of the entire maze, and it's not the fastest of the | |
# algorithms (what with all the set and edge management is has to | |
# do). Also, the mazes it generates tend to have a lot of very short | |
# dead-ends, giving the maze a kind of "spiky" look. | |
# -------------------------------------------------------------------- | |
# NOTE: the display routine used in this script requires a terminal | |
# that supports ANSI escape sequences. Windows users, sorry. :( |
$ git clone github:lenary/guides.git | |
Cloning into guides... | |
remote: Counting objects: 255, done. | |
remote: Compressing objects: 100% (216/216), done. | |
remote: Total 255 (delta 111), reused 163 (delta 35) | |
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done. | |
Resolving deltas: 100% (111/111), done. | |
$ cd guides | |
$ git remote -v |
module CpuProf | |
require 'ffi' | |
extend FFI::Library | |
ffi_lib FFI::CURRENT_PROCESS | |
begin | |
attach_function :start, :ProfilerStart, [:string], :void | |
attach_function :stop, :ProfilerStop, [], :void | |
rescue FFI::NotFoundError => e | |
STDERR.puts "*** Are you sure you preloaded libprofiler?" |
### | |
# lolquery is an fresh new take on SQL DSLs. NEVER WRITE SQL AGAIN! Using | |
# amazing lolquery technology, you too will never have to write another SQL | |
# statement again! | |
# | |
# Check out this simple example of using lolquery. Bask in it's simplicity, | |
# it's expressiveness, but most importantly, it's lack of writing SQL! | |
# | |
# <3 <3 <3 <3 <3 |
module Test | |
module Unit | |
TestCase = RSpec::Core::ExampleGroup | |
end | |
end | |
class Test::Unit::TestCase | |
def self.inherited(host) | |
host.set_it_up host.name.gsub(/(Spec|Test)/,'') | |
def host.method_added(name) |
# minimal rails3 app | |
require 'action_controller' | |
Router = ActionDispatch::Routing::RouteSet.new | |
Router.draw do | |
root :to => 'site#index' | |
end | |
class SiteController < ActionController::Metal |
#WIP | |
#spec/spec_helper.rb | |
RSpec.configure do |config| | |
#Only for selenium based tested filtered with :js => true on tests | |
#eg: describe "Some test", :js => true do | |
# end | |
config.around(:each, :js => true) do |example| |