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
Sequel.extension(:pg_hstore, :pg_hstore_ops, :pg_array) | |
DB = Sequel.connect('postgres://user:pass@localhost/db') | |
class Messages < Sequel::Model | |
end | |
Messages.first | |
#=> #<Messages @values={:id=>1, :observable_name=>"testo", :observable_content=>{"key1"=>"value1", "key2"=>"value2", "key3"=>"value3"}, :created_at=>2014-03-25 15:37:30 +1100}> |
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
begin remote | |
name /etc/lircd.conf | |
bits 13 | |
flags RC5|CONST_LENGTH | |
eps 30 | |
aeps 100 | |
one 907 885 | |
zero 907 885 | |
gap 113935 | |
toggle_bit 2 |
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
Oct 10 17:12:57 Nervous-Energy.local apsd[115]: Unrecognized leaf certificate | |
Oct 10 17:12:57 Nervous-Energy.local apsd[115]: Illegal subject name missing 'courier.push.apple.com' (2.5.4.3): ({ | |
label = "2.5.4.6"; | |
"localized label" = "2.5.4.6"; | |
type = string; | |
value = US; | |
}, { | |
label = "2.5.4.8"; | |
"localized label" = "2.5.4.8"; | |
type = string; |
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
HTTP/1.1 302 Found | |
Server: nginx/1.8.0 | |
Date: Sat, 13 Jun 2015 12:50:10 GMT | |
Content-Type: text/html; charset=utf-8 | |
Transfer-Encoding: chunked | |
Connection: keep-alive | |
Status: 302 Found | |
cache-control: no-cache | |
x-xss-protection: 1; mode=block | |
x-request-id: 54fa26a0-60fa-4fa0-9191-f0af3ba8844e |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.ozbargains</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/{username}/bin/ozb.rb</string> |
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
require 'open-uri' | |
require 'nokogiri' | |
baseCurrency='AUD' | |
settlementDate=(Date.today - 4).strftime("%m/%d/%Y") | |
finalCurrency='USD' | |
url="https://www.mastercard.com/psder/eu/callPsder.do?service=getExchngRateDetails&baseCurrency=#{baseCurrency}&settlementDate=#{settlementDate}" | |
doc = Nokogiri::HTML(open(url)) | |
rate = doc.xpath("//transaction_currency_dtl/alpha_curency_code[text()='#{finalCurrency}']/following-sibling::conversion_rate").text |
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 |
OlderNewer