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
Loading production environment (Rails 2.3.11) | |
ree-1.8.7-2011.03 :001 > Product.find_by_gtin("9781854309655") | |
ArgumentError: time out of range | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:635:in `local' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:635:in `each' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:635:in `select' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all' | |
from /usr/local/rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/base.rb:665:in `find_by_sql' | |
from /usr/local/rvm/gems/ree-1.8.7-2011 |
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
#!/bin/bash | |
# In your Vagrant file, add a shell provisioner, pointing to this file: | |
# | |
# config.vm.provision :shell, :path => "babushka.sh" | |
# | |
# Download and chmod the Babushka installer, if it's not already installed. | |
which babushka || bash -c "`wget -O - babushka.me/up/hard`" |
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
description "Airvideo Server statup script" | |
author "Dan Milne" | |
start on startup | |
stop on shutdown | |
console output | |
respawn |
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
#!/bin/bash | |
# Arguments - %CHANID% %STARTTIME% %TITLE% | |
ChanID="${1}" | |
StartTime="${2}" | |
Title="${3}" | |
Subtitle="${4}" | |
Desc="${5}" | |
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
def calculate_sig(data, key) | |
digest = OpenSSL::Digest::Digest.new('sha1') | |
res = OpenSSL::HMAC.digest(digest, key, data) | |
sig = [res].pack('m').chomp | |
return sig | |
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
=== Pre caching changes === | |
Concurrency Level: 5 | |
Time taken for tests: 110.804 seconds | |
Complete requests: 50 | |
Failed requests: 0 | |
Write errors: 0 | |
Total transferred: 966865 bytes | |
HTML transferred: 920200 bytes | |
Requests per second: 0.45 [#/sec] (mean) |
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
irb(main):001:0> a=nil | |
=> nil | |
irb(main):002:0> a || "Hello" | |
=> "Hello" | |
irb(main):003:0> a="World" | |
=> "World" | |
irb(main):004:0> a || "Hello" | |
=> "World" |
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
Sampling process 280 for 3 seconds with 1 millisecond of run time between samples | |
Sampling completed, processing symbols... | |
Analysis of sampling Dock (pid 280) every 1 millisecond | |
Process: Dock [280] | |
Path: /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock | |
Load Address: 0x10f74b000 | |
Identifier: com.apple.dock | |
Version: 1.8 (1040.39) | |
Build Info: Dock-1040039000000000~1 | |
Code Type: X86-64 (Native) |
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
# Create a variable $bulk_agent by matching against $http_user_agent | |
map $http_user_agent $bulk_agent { | |
default 0; | |
~*Google* 1; | |
~*Wget* 1; | |
~*Ruby* 1; | |
~*Java* 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
dkam@Nervous-Energy ~/Development/Booko/app/models/shops (master) $ curl -I http://imgsrv.booko.com.au:8888/9780307474612 | |
HTTP/1.1 200 OK | |
Content-Type: image/jpeg | |
Connection: keep-alive | |
Status: 200 | |
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.11 | |
X-Frame-Options: sameorigin | |
X-XSS-Protection: 1; mode=block | |
Cache-Control: public, max-age=60480 | |
Last-Modified: Wed, 29 Aug 2012 06:39:41 GMT |
OlderNewer