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 'set' | |
def loquesea | |
g << :uno | |
g << :dos | |
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
# The spec | |
let(:stamp){ mock_model(CompanyStamp) } | |
let(:signature){ mock_model(CompanyHandwrittenSignature) } | |
let(:account) { mock_model(Account, :company_handwritten_signature => signature, :company_stamp => stamp) } | |
it "should have signature if the account has signature" do | |
subject.account = account | |
subject.stub(:save).and_return(true) | |
subject.company_handwritten_signature.should == signature | |
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
Installing capybara-webkit (0.7.2) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/Teimas/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb | |
/usr/bin/qmake | |
/usr/bin/make | |
cd src/ && /usr/bin/qmake /Users/Teimas/.rvm/gems/ruby-1.9.3-p0@teixo_ruby19/gems/capybara-webkit-0.7.2/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server | |
/usr/bin/make | |
cd src/ && make -f Makefile.webkit_server | |
g++ -c -pipe -g -gdwarf-2 -Wall -W -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -I. -F/Library/Frameworks -o main.o main.cpp |
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
# I want to create an action that returns a chunked response, waiting 1 second between chunks. | |
# Honestly, I don't understand a single word of the documentation. | |
# Thats my code | |
defmodule ApplicationRouter do | |
use Dynamo.Router | |
prepare do | |
# Pick which parts of the request you want to fetch | |
# You can comment the line below if you don't need |
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 'httparty' | |
require 'nokogiri' | |
USERNAME = "[email protected]" | |
PASSWORD = "your-password-here" | |
COOKIE_FILE = 'cookies.txt' # by example | |
class RubytapasDownloader | |
FEED_URL = "https://rubytapas.dpdcart.com/feed" | |
LOGIN_URL = "http://rubytapas.dpdcart.com/subscriber/login?__dpd_cart=8f511233-b72b-4a8c-8c37-fadc74fbc3a1" |
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 | |
# vim: set syntax=ruby | |
# Ensures that changes to the Rails schema.rb file may only be committed if a | |
# migration file is also committed at the same time. | |
def schema_modified? | |
%x[ git diff --cached |grep schema.rb ] == '' | |
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
# This steps is for git 1.8.X in mac, installed bien binary package http://git-scm.com/download/mac | |
# Clone git source | |
git clone [email protected]:git/git.git | |
# Make & install | |
cd git/contrib/subtree | |
make | |
sudo make prefix=/usr/local/git install |
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 subtree usage | |
# Commit your changes as you always did | |
git add . | |
git commit -m "Some changes" | |
# From time to time, you can submit all the changes you made in the folder of your subproject to the main project. | |
git subtree push -f --prefix=app/assets/javascripts/gmapp/models/ goldenmanager-ember-models master | |
# Also, from time to time you should pick changes from the subtree remote |
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
# Usage: | |
# source iterm2.zsh | |
# iTerm2 window/tab color commands | |
# Requires iTerm2 >= Build 1.0.0.20110804 | |
# http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes | |
tab-color() { | |
echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
echo -ne "\033]6;1;bg;green;brightness;$2\a" | |
echo -ne "\033]6;1;bg;blue;brightness;$3\a" |
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
console.log('%c ', 'background:url(http://img1.imensagens.com/en/rainbow/2.gif) no-repeat; line-height: 15rem; font-size: 130px;'); |
OlderNewer