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
| body { background: #222; color: #e6e6e6; } | |
| a { color: #949494; } | |
| a:link, a:visited { color: #949494; } | |
| a:hover, a:active, a:focus { color: #c7c7c7; } | |
| hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; } |
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 'bundler/setup' | |
| require 'active_record' | |
| include ActiveRecord::Tasks | |
| db_dir = File.expand_path('../db', __FILE__) | |
| config_dir = File.expand_path('../config', __FILE__) | |
| DatabaseTasks.env = ENV['ENV'] || 'development' |
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 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
| # require 'mina/rvm' # for rvm support. (http://rvm.io) | |
| # Basic settings: | |
| # domain - The hostname to SSH to. | |
| # deploy_to - Path to deploy into. | |
| # repository - Git repo to clone from. (needed by mina/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
| func POST(delationType: String, description: String, referenceType: String, latitude: Double, longitude: Double, photos: [Photo], completionHandler: (object:AnyObject?, success: Bool) -> Void) -> Void { | |
| let url:NSURL? = NSURL(string: "http://ima.rogalabs.com/api/v1/ombudsmen") | |
| let request = NSMutableURLRequest(URL: url!) | |
| request.HTTPMethod = "POST" | |
| // Set Content-Type in HTTP header. | |
| let boundary = "---------------------------14737809831466499882746641449"; // This should be auto-generated. | |
| let contentType = "multipart/form-data; boundary=" + boundary | |
| request.setValue(contentType, forHTTPHeaderField: "Content-Type") |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
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
| Steps to Configuring for Xcode Developemnt: | |
| 1. Install Xcode | |
| 2. Ruby | |
| 3. Install RubyGems | |
| 4. Install LiftOff | |
| -- https://github.com/thoughtbot/liftoff | |
| 5. Download Project from Bitbucket | |
| 6. Run the following command from the project folder: | |
| -- liftoff |
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 AccountTransaction | |
| . . . | |
| def transfer( fromAccount , toAccount , amount ) | |
| fromAccount . debt( amount ) | |
| toAccount . credit( amount ) | |
| send_notifications_to_accounts( fromAccount , toAccount ) | |
| end | |
| def paypal_transfer_to( fromAccount , toAccount , amount ) | |
| #PayPal stuff |
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 paypal_transfer_to( account , amount ) | |
| #PayPal stuff | |
| email_sender . send_account_changed_notification( account ) | |
| email_sender . send_account_changed_notification( self ) | |
| 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
| class BankAccount < ActiveRecord : :Base | |
| . . . | |
| def transfer_to( account , amount ) | |
| self . debt( amount ) | |
| account . credit( amount ) | |
| email_sender . send_account_changed_notification( account ) | |
| email_sender . send_account_changed_notification( self ) | |
| 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
| class BankAccount < ActiveRecord : :Base | |
| . . . | |
| def transfer_to( account , amount ) | |
| self . debt( amount ) | |
| account . credit( amount ) | |
| email_sender . send_account_changed_notification( account ) | |
| email_sender . send_account_changed_notification( self ) | |
| end | |
| . . . | |
| end |