This file contains 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
Show hidden characters
[ | |
// | |
// TABS (REGULAR) | |
// | |
// Tab set | |
{ | |
"class": "tabset_control", | |
"layer0.texture": "", |
This file contains 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
Palestras TDC 2014 - Florianópolis | |
Watir | |
Lucas Prim | |
http://www.slideshare.net/lucasprim/apresentacao-watir | |
RSpec Best Friends | |
Mauro George | |
http://pt.slideshare.net/maurogeorge/rspec-best-friends-34875731 |
This file contains 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
class PasswordsController < Devise::PasswordsController | |
# here we need to skip the automatic authentication based on current session for the following two actions | |
# edit: shows the reset password form. need to skip, otherwise it will go directly to root | |
# update: updates the password, need to skip otherwise it won't even reset if already logged in | |
skip_before_filter :require_no_authentication, :only => [:edit, :update] | |
# we need to override the update, too. | |
# After a password is reset, all outstanding sessions are gone. | |
# When already logged in, sign_in is a no op, so the session will expire, too. | |
# The solution is to logout and then re-login which will make the session right. |
This file contains 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
class Comment < ActiveRecord::Base | |
belongs_to :commentable, polymorphic: true | |
has_many :comments, as: :commentable | |
end |
This file contains 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
# set Ctrl-a as the default prefix key combination | |
# and unbind C-b to free it up | |
set -g prefix C-k | |
unbind C-b | |
#set-window-option -g mode-mouse on | |
# set window and pane index to 1 (0 by default) | |
set-option -g base-index 1 | |
setw -g pane-base-index 1 |
This file contains 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
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAgAElEQVR4Xky9a9DuaVbWd/2Pz+E97vPu3t09PYeeA8OMIIIjMXE0qBWrEmOSSmE8QEXj2ZRSIqnKB/PRT6aST5qyKhXLikQQGBCIiqCgQEAQgekZmO6Z7p7u3Xvvd7/7PT6H/zn1u9b97Jmu6Zru3e/7PP//fa97rWtd61rrzr5/00/FMKksC9WjNEyTsmHUeuq1l9caykz5OGnKM2VZpmwaNY6T+nFUnueassz/Td2oIs/VZ5OqItegSVKmfhqUZ5nGcVQ5ZRomvmOU8lxFlklFJn40lzT0k/+5zUZ1Xa+iLLVfFWqmTMU4aTvIz9Blk9SP/mf/Ov86DKpnlZ9tGCYNozTyH4pCfT+p4Af7Qc3Qazav1PC8WcEj+ud5lm6YlBWZ2rZTNuXKy8yfrSkXj5rlmcaB75s08b38/ChlRa4snzRN8bvlvFS3HTTlhUZJIy/FGgyD8rzUOIxe0zHn8QqN/SReve86r6n/jDVP38N7Dr3U9b2qqtZm6FUq93qOfv9MwzBqU06aZbn/OePdJOXT5M/K2aNRasdJZZ5rHPjOUZpGdYNUz0o1Ta9qKtVNo2q/cKZNNmqb516bkpcZpLEfvNcsQte2mpWVsqpQ344qM6nNJ2Vtr6KuvJ99H2s2Frn/P2dvMqnEpn50NU5DMSnvRtVFoUmZhmzQfMw1ZJP6MlMxhREOGTbF4kmN2LTCBsAC95qUt9I4K1Sy6NgYL1fmKoZRnfcg80K0bESGycWD8JAYgPe6n7wAzTSoKkvVY6ahSEa2DaNXxYaMGvMsjHsYVZQ5a4ldq+tGbxgv2IwcDGyPQ1QoL/hnnrbQNMSB82KyKLxe6TVW3/bKJwxB/h0/K0ZR5N6IsZTGdopDOY4a+CEMi3fg+dhoxfP1g7S1IYyqqtyfM7aDpqpQp1gfDJ6FGHko1jvPNLBoGP04aj4vtVlPNnSWjnccR3 |
This file contains 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
# Use Unicorn as the app server | |
# gem 'unicorn' | |
# Use Capistrano for deployment | |
# gem 'capistrano-rails', group: :development |
This file contains 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
config.generators do |g| | |
g.test_framework :rspec, fixture: true | |
g.fixture_replacement :factory_girl, dir: 'spec/factories' | |
g.view_specs false | |
g.helper_specs false | |
g.stylesheets = false | |
g.javascripts = false | |
g.helper = false | |
end |
This file contains 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
class AddHstoreExtension < ActiveRecord::Migration | |
def up | |
execute 'CREATE EXTENSION hstore' | |
end | |
def down | |
execute 'DROP EXTENSION hstore' | |
end | |
end |
This file contains 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
// Came from the comments here: https://gist.github.com/maruf-nc/5625869 | |
app.filter('titlecase', function() { | |
return function (input) { | |
var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i; | |
input = input.toLowerCase(); | |
return input.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(match, index, title) { | |
if (index > 0 && index + match.length !== title.length && | |
match.search(smallWords) > -1 && title.charAt(index - 2) !== ":" && | |
(title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && |