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
// "use strict"; | |
const binance = require('node-binance-api'); | |
const chalk = require('chalk'); | |
const log = console.log; | |
const moment = require('moment'); | |
// percentage of gains targeted | |
const MIN_PROFIT_TARGET = 0.1; | |
const MAX_PROFIT_TARGET = 5.0; | |
const NUMBER_OF_TRADES_OPPORTUNITIES = 1; | |
let ARBITRAGE_OPP_COUNT = 0; |
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
.typeahead, | |
.tt-query, | |
.tt-hint { | |
width: 396px; | |
height: 30px; | |
padding: 8px 12px; | |
font-size: 24px; | |
line-height: 30px; | |
border: 2px solid #ccc; | |
-webkit-border-radius: 8px; |
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
[22] pry(main)> profile_data = JRuby::Profiler.profile do | |
[22] pry(main)* [*50..1000].collect {|val| val = val + 10} | |
[22] pry(main)* end | |
=> #<Java::OrgJrubyRuntimeProfile::ProfileData:0x63d8669d> | |
[23] pry(main)> profile_printer = JRuby::Profiler::GraphProfilePrinter.new(profile_data) | |
=> #<Java::OrgJrubyRuntimeProfile::GraphProfilePrinter:0x18755efe> | |
[24] pry(main)> profile_printer.printProfile(STDOUT) | |
Total time: 0.00 |
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
namespace :load_data do | |
desc "loads all of the event data into the database" | |
task :events => :environment do | |
# BM Great Lakes Tour = 1 | |
# BM SouthWestern Tour = 2 | |
# BM Wildcards = 3 | |
# BM 100 Tour = 4 | |
# BM Central Tour = 5 | |
# BM Eastern Tour = 6 | |
# BM NorthWestern Tour = 7 |
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
=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 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 PromotionAttachment < ActiveRecord::Base | |
belongs_to :promotion | |
attr_accessible :like_gate_image, :promotion_image | |
[:like_gate_image, :promotion_image].each do |file_name| | |
options = { | |
styles: { | |
medium: "300x300>}", |
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
class PromotionAttachment < ActiveRecord::Base | |
belongs_to :promotion | |
attr_accessible \ | |
:like_gate_image, | |
:promotion_image, | |
:app_icon, | |
:video_url | |
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
<div class="control-group"> | |
<label class="control-label" for="focusedInput">Focused input</label> | |
<div class="controls"> | |
<input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused…"> | |
</div> | |
</div> |
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
routes.rb | |
namespace :facebook do | |
namespace :canvas do | |
namespace :photo_contest do | |
resources :promotions do | |
member do | |
get 'like_gate', :as => "page_like_gate" | |
get 'info_page' | |
get 'thank_you_page' |
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
<soapenv:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:urn='urn:MarketingCenter' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<urn:Put soapenv:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'> | |
<Authentication xsi:type='ns1:Authentication'> | |
<Username xsi:type='xsd:string'>******</Username> | |
<Password xsi:type='xsd:string'>*******</Password> | |
<CustomerId xsi:type='xsd:int'>3301</CustomerId> | |
<Level xsi:type='xsd:int'>1</Level> | |
<Source xsi:type='xsd:string'>hostname: HOST</Source> |
NewerOlder