Skip to content

Instantly share code, notes, and snippets.

Working from home

Lucas Arruda LucasArruda

Working from home
View GitHub Profile
View deploy.rb
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
## available environments
task :production do
set :application, ''
set :repository, ''
sohara / table cell locator.rb
Created Feb 2, 2011
step definition to test the contents of specific table row given a column heading and the contents of one of the cells in the row
View table cell locator.rb
# Locates a table cell based on given row and column content.
When /^(.*) in the "([^\"]*)" column of the "([^\"]*)" row$/ do |action, column_title, row_title|
col_number = 0
all(:xpath, "//*[(th|td)/descendant-or-self::*[contains(text(), '#{column_title}')]]/th").each do |element|
col_number += 1
break if element.has_content?(column_title)
within :xpath, "//*[(th|td)/descendant-or-self::*[contains(text(), '#{row_title}')]]/td[#{col_number}]" do
When action
View .rvmrc
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
# Uncomment following line if you want options to be set only for given project.
mattfinlayson / gist:1530870
Created Dec 29, 2011
iconv errors running jekyll on os x
View gist:1530870
rake generate
## Generating Site with Jekyll
directory source/stylesheets/
create source/stylesheets/screen.css
/Users/BLARG/.rvm/gems/ruby-1.9.2-p290/gems/maruku-0.6.0/lib/maruku/input/parse_doc.rb:22:in `require': no such file to load -- iconv (LoadError)
from /Users/BLARG/.rvm/gems/ruby-1.9.2-p290/gems/maruku-0.6.0/lib/maruku/input/parse_doc.rb:22:in `<top (required)>'
from /Users/BLARG/.rvm/gems/ruby-1.9.2-p290/gems/maruku-0.6.0/lib/maruku.rb:85:in `require'
from /Users/BLARG/.rvm/gems/ruby-1.9.2-p290/gems/maruku-0.6.0/lib/maruku.rb:85:in `<top (required)>'
from /Users/BLARG/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll.rb:26:in `require'
from /Users/BLARG/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll.rb:26:in `<top (required)>'
fnando / Gruntfile.js
Created Aug 22, 2013
Sane Gruntfile.js organization.
View Gruntfile.js
module.exports = function(grunt) {
var config = {};
// Set all the tasks you want to load.
var tasks = [
, "grunt-contrib-concat"
, "grunt-contrib-uglify"
, "grunt-contrib-jshint"
, "grunt-contrib-watch"
jwo / secret_controller.rb
Created Nov 5, 2013
Devise testing controllers - minitest / rails4
View secret_controller.rb
class SecretController < ApplicationController
before_filter :authenticate_user!
def show
klauswuestefeld / gist:1595701
Created Jan 11, 2012
O Ciclo Vicioso Do Software Retranqueiro
We couldn’t find that file to show.
joel / redis.rb
Created Apr 14, 2012
View redis.rb
class MockRedis
attr_accessor :store
def initialize
@store = {}
def flushall
@store = {}
mattdesl /
Last active May 27, 2020
sublime lint auto save hack

quick hack to explore auto-saving on lint-free code

Using SublimeLint3

Sublime Text -> Preferences -> Browser Packages Open in Sublime.

Seek to the highlight method (Cmd + R)

replace with function (see below)


This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
  • NBC