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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(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
class Aluno | |
def initialize(nota) | |
@nota = nota | |
end | |
def esta(selector) | |
selector.call(@nota) | |
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
=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
For 32-bit system | |
use phantomjs-1.9.0-linux-i686.tar.bz2 | |
For 64-bit system | |
use phantomjs-1.9.0-linux-x86_64.tar.bz2 | |
Go to the SHARE directory | |
cd /usr/local/share |
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 'machinist/caching/active_record' | |
Dir[Rails.root.join("spec/blueprints/**/*.rb")].each {|f| require f} | |
require "#{Rails.root}/spec/support/preloadable_factories" | |
require "#{Rails.root}/spec/support/factories" | |
FactoryGirl::Preload.run |
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 log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
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
Extract to Method: Hit your <leader-key> then type rem | |
Rename Instance Variable: Hit your <leader-key> then type rriv | |
Rename Local Variable: Hit your <leader-key> then type rrlv | |
Extract Local Variable: relv | |
Extract to Let: Hit your <leader-key> then type rel | |
Extract Constant: Hit your <leader-key> then type rec | |
Convert Post Conditional: Hit your <leader-key> then type rcpc | |
Inline Temp: Hit your <leader-key> then type rit | |
Add Parameter: Hit your <leader-key> then type rap |
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
<script type="text/javascript"> | |
function loadCapabilityFromBudgetAllocation(event, budget_allocation) { | |
if (budget_allocation) { | |
var capabilities = budget_allocation.capabilities; | |
if (capabilities.length == 1) { | |
$(this).closest('.nested-extra_credit_moviment_types').find('.capability').val(capabilities[0].description); | |
$(this).closest('.nested-extra_credit_moviment_types').find('.capability').next('input').val(capabilities[0].id); | |
$(this).closest('.nested-extra_credit_moviment_types').find('.capability').attr('disabled','disabled'); |
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
# encoding: utf-8 | |
class TaxRevenueGroupedBuilder | |
attr_accessor :retentions | |
attr_writer :tax_revenue, :tax_revenue_issued_status, :tax_revenue_receipt, | |
:tax_revenue_receipt_issued_status | |
def initialize(retentions) | |
self.retentions = retentions | |
end |
OlderNewer