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
| run 'gem sources -a http://gemcutter.org' | |
| git :init | |
| file '.gitignore', <<TXT | |
| log/*.log | |
| tmp/**/* | |
| db/*.sqlite3 | |
| .DT_Store | |
| TXT |
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
| run 'gem sources -a http://gemcutter.org' | |
| git :init | |
| file '.gitignore', <<TXT | |
| log/*.log | |
| tmp/**/* | |
| db/*.sqlite3 | |
| .DT_Store | |
| TXT |
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
| dns - http://freedns.ws | |
| google apps - http://google.com/a | |
| yola, pra criar o site - http://www.yola.com/ | |
| logonerds, logos por $50 - http://www.logonerds.com/ | |
| wuffo, forms builder - http://wufoo.com/ | |
| analytics, pra monitorar - http://www.google.com/analytics/ | |
| blog (tumblr) | |
| adwords |
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
| # Considerando que o ano está em $7 | |
| main: # Divisíveis por 400 são bissextos | |
| addi $8, $0, 400 | |
| div $7, $8 | |
| mfhi $9 | |
| beq $9, 0, bissexto | |
| # Divisíveis por 100 e não por 400 não são bissextos | |
| addi $8, $0, 100 |
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
| #include<stdio.h> | |
| #include<string.h> | |
| int subpadrao(char romano[], int decimal, int base, char letra_1, char letra_5, char letra_10) { | |
| while(decimal >= 10 * base) { | |
| strncat(romano, &letra_10, 1); | |
| decimal -= 10 * base; | |
| } | |
| if(decimal >= 9 * base) { | |
| strncat(romano, &letra_1, 1); |
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
| Comment.blueprint do | |
| author_name "Test name" | |
| author_email "unknown@maisweb.org" | |
| post | |
| end | |
| Comment.blueprint(:approved) do | |
| state :approved | |
| 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
| post = Post.make | |
| post.new_record? # false | |
| post = Post.make_unsaved | |
| post.new_record? # true | |
| post.plan | |
| # { :title => "Lorem ipsum", :body => "Lorem ipsum dolor sit amet", ... } | |
| post = Post.make(:title => "Machinist FTW") |
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
| Post.blueprint do | |
| title "Hello world" | |
| text "<p>Hello there</p>"*3 | |
| published_on Date.today | |
| author { User.make } | |
| end | |
| Comment.blueprint do | |
| author_name "Test name" | |
| author_email "unknown@maisweb.org" |
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 'faker' | |
| Sham.name { Faker::Name.name } | |
| Sham.email { Faker::Internet.email } | |
| Sham.title { Faker::Lorem.sentence } | |
| Sham.body { Faker::Lorem.paragraph } | |
| User.blueprint do | |
| name | |
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 File.dirname(__FILE__) + '/../spec_helper' | |
| describe Event do | |
| it { should belong_to(:organizer, :class_name => "User") } | |
| it { should have_many(:registrations) } | |
| it { should have_many(:users, :through => :registrations) } | |
| it { should have_many(:promocodes)} | |
| it { should validate_presence_of(:title, :location, :description, :start_at, :finish_at)} | |
| it { should validate_numericality_of(:price, :allow_nil => true)} |