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
| var App = App || {}; | |
| App.ac_appender = { | |
| /* | |
| * ======================================== | |
| * | |
| * requires jquery autocomplete | |
| * | |
| * ======================================== |
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
| --- | |
| layout: project | |
| title: "Project 1" | |
| subtitle: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamsit e nonummy nibh euismod tincidunt ut laoreet magna aliquam." | |
| date: 2014-09-05 17:49:49 | |
| categories: projects | |
| description: "Descrição do projeto no thumbnail com mouse over consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore lorem ipsum sit dolor amet hyperlink aliquam erat volutpat. Ut wisi enim ad minim veniam, veniam, quis nostrud exerci tation aliquip ex ea commodo consequat." | |
| authors: ["lionelmessi", "cristianoronaldo", "frankribery"] | |
| --- |
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
| STATES = { | |
| REGION_SOUTH => ['PR', 'RS', 'SC'], | |
| REGION_SOUTHEAST => ['ES', 'MG', 'RJ', 'SP'], | |
| REGION_MIDWEST => ['DF', 'GO', 'MT', 'MS'], | |
| REGION_NORTH => ['AC', 'AM', 'AP', 'PA', 'RO', 'RR', 'TO'], | |
| REGION_NORTHEAST => ['AL', 'CE', 'BA', 'MA', 'PB', 'PE', 'PI', 'RN', 'SE'] | |
| } |
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 'rails_helper' | |
| feature 'authentication' do | |
| let!(:user) { create(:user, password: '12345678', password_confirmation: '12345678') } | |
| before do | |
| visit root_path | |
| fill_in :user_email, with: user.email | |
| fill_in :user_password, with: '12345678' | |
| click_button 'Sign in' |
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
| { | |
| "auto_completecommiton_tab": true, | |
| "bold_folder_labels": true, | |
| "color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
| "draw_white_space": "all", | |
| "ensure_newline_at_eof_on_save": true, | |
| "folder_exclude_patterns": | |
| [ | |
| ".svn", | |
| ".git", |
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
| PagSeguroDirectPayment.setSessionId('session_id from backend'); | |
| PagSeguroDirectPayment.getInstallments({ | |
| amount: 50.00, | |
| brand: "visa", | |
| success: function(response) { | |
| console.log("installments:"); | |
| console.log(response); | |
| }, | |
| error: function(response) { |
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
| module Foo | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| # alternative | |
| def base.class_name | |
| "class method name" | |
| end | |
| 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
| def products_path | |
| "/products" | |
| end | |
| def product_path(id) | |
| "/products/#{id}" | |
| end | |
| def dic | |
| { |
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
| class Device | |
| CONSUMPTIONS = { | |
| "1" => { method_id: 2, value: 20 }, | |
| "2" => { method_id: 6, value: 0.001 }, | |
| "3" => { method_id: 7, value: 30 } | |
| } | |
| end | |
| puts Device::CONSUMPTIONS["2"][:method_id] # => 6 | |
| puts Device::CONSUMPTIONS["2"][:value] # => 0.001 |
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
| module ActsAsLogger | |
| module Logger | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| end | |
| module ClassMethods | |
| def acts_as_logger(options={}) | |
| include InstanceMethods | |
OlderNewer