Skip to content

Instantly share code, notes, and snippets.

View esdras's full-sized avatar

Esdras Mayrink esdras

View GitHub Profile
@nruth
nruth / cookie_steps.rb
Created July 21, 2010 17:16
Testing login "remember me" feature with Capybara (rack::test or selenium) - deleting the session cookie (only)
@tpope
tpope / .gitattributes
Created October 24, 2010 20:38
Fewer conflicts in your Rails apps
Gemfile.lock merge=bundlelock
db/schema.rb merge=railsschema
@carlosbrando
carlosbrando / Gemfile
Created January 17, 2011 18:11
Debug funcionando de acordo com a versão no Bundler
group :development, :test do
gem 'ruby-debug', :platforms => :ruby_18
gem 'ruby-debug19', :platforms => :ruby_19
end
#!/usr/bin/env ruby
require 'slop'
opts = Slop.parse do
banner "Usage: ruby foo.rb [options]\n"
on :n, :name, 'Your username', true
on :a, :age, 'Your age (optional)', :optional => true
on :V, :verbose, 'Run in verbose mode', :default => false
@ppworks
ppworks / Guardfile.diff
Created August 26, 2011 12:05
"Could not start Spork server for RSpec" when guard start.
diff --git a/Guardfile b/Guardfile
index 90843a8..6ffae21 100644
--- a/Guardfile
+++ b/Guardfile
@@ -1,7 +1,7 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
-guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
+guard 'spork', :wait => 60, :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
@croaky
croaky / single_recipient_smtp.rb
Created March 15, 2012 06:32
Set staging environment email to go to a single email address you control in order to not accidentally send production email addresses staging data.
module SingleRecipientSmtp
def self.included(clazz)
clazz.class_eval do
cattr_accessor :single_recipient_smtp_settings
end
end
def perform_delivery_single_recipient_smtp(mail)
mail.to = single_recipient_smtp_settings[:to]
mail.cc = nil
@ayamomiji
ayamomiji / gist:4736614
Last active November 10, 2017 11:16
turbolinks + angularjs
bootstrapAngular = ->
$('[ng-app]').each ->
module = $(this).attr('ng-app')
angular.bootstrap(this, [module])
$(document).on('page:load', bootstrapAngular)
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@erikhenrique
erikhenrique / bin-cc.md
Last active June 30, 2024 22:14
Bin de cartões de crédito para validação

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing