This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paths = Rails.application.railties.engines.map {|e| e.root } | |
paths.push Rails.root | |
# Load every stylesheet in application.css | |
sass "public/stylesheets/application.css" do | |
# First load the basics/*.scss and then the rules | |
["basics/", ""].each do |prefix| | |
paths.reverse.each do |path| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export RUBY_HEAP_MIN_SLOTS=500000 | |
export RUBY_HEAP_SLOTS_INCREMENT=250000 | |
export RUBY_GC_MALLOC_LIMIT=50000000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
/opt/ruby-enterprise/bin/rake "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
begin | |
require 'cucumber' | |
require 'cucumber/rake/task' | |
Cucumber::Rake::Task.new(:features) do |t| | |
t.cucumber_opts = "--format pretty" | |
end | |
task :features => 'db:test:prepare' | |
rescue LoadError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to more_web_steps.rb | |
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today! | |
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text| | |
alert = page.driver.browser.switch_to.alert | |
alert.text.should eq(text) | |
alert.send(action) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration = configure do |config| | |
config.tail_logs = true | |
config.max_connections = 55 | |
config.admin_password = 'secret' | |
config.app_server do |app_server_config| | |
app_server_config.port = 8808 | |
app_server_config.admin_password = config.admin_password | |
end | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# jazzfonica.rb for Mac OS X | |
# Scans the visible networks for JAZZTEL_XXXX or WLAN_XXXX and calculates the password | |
# Ported from PHP example at http://kz.ath.cx/wlan/codigo.txt | |
# Download and execute with ruby (e.g. ruby jazzfonica.rb) from a Terminal | |
require 'digest/md5' | |
messages = [] | |
unless !File.exists?('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#=require haml | |
#=require backbone | |
class PageView extends Backbone.View | |
tag: "div" | |
class: "page" | |
classes: -> | |
[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
1.) Open any application | |
2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
3.) Release Power button | |
4.) Press and hold Home button Lightly | |
until screen returns to icon screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.sites.insert({"cities": [ { "country" : { "code" : "ES" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "US" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "US" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "ES" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "PT" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "BR" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "BR" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "CA" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "CA" } } ] }); | |
db.sites.insert({"cities": [ { "country" : { "code" : "CA" } } ] }); |