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
2.0.0p247 :001 > a = [1, 2] | |
=> [1, 2] | |
2.0.0p247 :002 > a[1] | |
=> 2 | |
2.0.0p247 :003 > a[2] | |
=> nil | |
2.0.0p247 :004 > a[1,1] | |
=> [2] | |
2.0.0p247 :005 > a[2,1] | |
=> [] ## <- Why is this not nil? |
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
Copyright (c) 2011 ZURB, http://www.zurb.com/ |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "cloudstack-simulator" | |
config.vm.box_url = "https://dl.dropboxusercontent.com/u/4153969/PromptWorks/cloudstack-simulator.box" | |
config.vm.network "private_network", ip: "10.0.123.101" | |
config.vm.provider "virtualbox" do |vbox| | |
vbox.memory = 2048 | |
end | |
end |
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
boocx@ip-10-71-58-116:~/boocx-api$ APP_ENV=production bundle exec rake sidekiq:workers | |
bundle exec sidekiq -c 50 -l logs/sidekiq.log -q main -v -r ./lib/loader.rb -e production | |
2013-01-22 20:03:22 +0000: Reconnecting from timeout. | |
Network Error: eventmachine not initialized: evma_set_pending_connect_timeout | |
E, [2013-01-22T20:03:22.863555 #28988] ERROR -- : Sidekiq::Processor crashed! | |
AWS::DynamoDB::Errors::InvalidSignatureException: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. | |
The Canonical String for this request should have been | |
'POST | |
/ |
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
# initialization file (not found) |
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
curl -o bundle.js -v https://d3ki9tyy5l5ruj.cloudfront.net/prod/compressed/build/bundles/c00321e18d419e70a4a6a80d416c4b24de679582/apps/asana/bundle.js | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 54.230.205.176... | |
* Connected to d3ki9tyy5l5ruj.cloudfront.net (54.230.205.176) port 443 (#0) | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
* Server certificate: *.cloudfront.net | |
* Server certificate: Symantec Class 3 Secure Server CA - G4 | |
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5 | |
> GET /prod/compressed/build/bundles/c00321e18d419e70a4a6a80d416c4b24de679582/apps/asana/bundle.js HTTP/1.1 |
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 BigDecimalWithoutTrailingZeroes < BigDecimal | |
def to_digits | |
_, significant_digits, _, exponent = split | |
if zero? | |
'0' | |
elsif exponent >= significant_digits.size | |
to_i.to_s | |
else | |
to_s('F') | |
end |
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
set background=dark | |
set guifont=Menlo\ for\ Powerline:h14 | |
colorscheme solarized | |
set guioptions=egmt | |
let &colorcolumn=join(range(80,999),",") |
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
GOOD_VERSIONS = %w[1.8.7p375 1.9.2p321 1.9.3p484 2.0.0p353] | |
apps = `heroku apps`.split("\n") | |
apps.each do |app| | |
next if app.include? "My Apps" | |
app = app.split(" ")[0] | |
output = `heroku run "ruby -v" -a #{app} 2>&1` | |
match = output.match(/ruby ([\d.p]+)/) | |
version = match ? match[1] : "unknown" | |
puts "#{app}\t#{version}\t#{GOOD_VERSIONS.include?(version) ? "OK" : "UPGRADE"}" | |
end |
NewerOlder