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
Factory.define :click do |f| | |
f.association :faq | |
f.data Time.now | |
f.sequence(:codigo_cliente) { |n| n.to_s.rjust(6,"0") } | |
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
git config --global github.user rodrigomb@gmail.com | |
git config --global github.token blablablabla |
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
gem install heroku | |
heroku create <NOME> | |
git remote add heroku git@heroku.com:<NOME>.git | |
git push heroku master |
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
Installation | |
- Download e Descompatação | |
wget http://apache.mirror.pop-sc.rnp.br/apache/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz | |
tar xvzf apache-tomcat-6.0.35.tar.gz | |
- Movendo para o local "correto" | |
sudo mv apache-tomcat-6.0.35 /usr/local/tomcat | |
- Adicionar JAVA_HOME ao bashrc |
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
describe User do | |
before do | |
@user = User.new(name: "Example User", email: "user@example.com") | |
end | |
. | |
. | |
. | |
describe "when email is not present" do | |
before { @user.email = " " } |
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
valid_email_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i | |
validates :email, presence: true, format: { with: valid_email_regex } | |
font: http://ruby.railstutorial.org/chapters/modeling-users?version=3.2 |
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
echo 3 > /proc/sys/vm/drop_caches |
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
Ordering | |
double.should_receive(:msg).ordered | |
double.should_receive(:other_msg).ordered | |
#This will fail if the messages are received out of order |
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
# Disable Spotlight | |
The primary method is using launchctl, this will require the administrative password: | |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist | |
Another approach is to use the older indexing method of “sudo mdutil -a -i off” which turns off indexing only, but more on that in a minute. | |
# Reenable Spotlight | |
The guaranteed way to reenable Spotlight is to reload it into launchd using launchctl: | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist |
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
Mudar icone do Finder: | |
System > Library > CoreServices > Dock ( Show Package Contents) > Contents > Resources> finder.png | |
e os da lixeira: | |
System > Library > CoreServices > Dock ( Show Package Contents) > Contents > Resources> trashempty.png e trashfull.png |
OlderNewer