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 'amqp' | |
AMQP.start 'amqp://localhost' do | |
puts 'Connected.' | |
AMQP::Channel.new do |channel, open_ok| | |
channel.queue "schwartz.test2", :durable => false do |queue, ok| | |
queue.subscribe do |headers, msg| | |
puts "Got message: #{msg}" | |
end | |
EM.add_periodic_timer 5 do |
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 'evented-spec' | |
require 'minitest/autorun' | |
require "amqp" | |
class TestConsumer | |
attr_reader :connection_string, :queue_name, | |
:connection, :channel, :queue, | |
:msg_count, :errors | |
def initialize opts={} |
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
Linux version 3.1.9+ (dc4@dc4-arm-01) (gcc version 4.5.1 (Broadcom-2708) ) #52 Tue May 8 23:49:32 BST 2012 | |
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d | |
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache | |
Machine: BCM2708 | |
Memory policy: ECC disabled, Data cache writeback | |
On node 0 totalpages: 57344 | |
free_area_init_node: node 0, pgdat c03bb910, node_mem_map c0408000 | |
Normal zone: 448 pages used for memmap | |
Normal zone: 0 pages reserved | |
Normal zone: 56896 pages, LIFO batch:15 |
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
71) | |
hub 1-1.3:1.0: unable to enumerate USB device on port 2 | |
DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK | |
DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK | |
DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK | |
hub 1-1.3:1.0: cannot disable port 2 (err = -71) | |
usb 1-1.3: USB disconnect, device number 56 |
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
root@raspbian:~# wpa_supplicant -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -dd | |
wpa_supplicant v1.0 | |
random: Trying to read entropy from /dev/random | |
Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A' | |
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf' | |
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' | |
ctrl_interface='/var/run/wpa_supplicant' | |
ctrl_interface_group='0' | |
ap_scan=2 | |
Line: 16 - start of a new network block |
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
6.611593] 0x30 0x14 0x01 0x00 0x00 0x0f 0xac 0x04 | |
[ 476.622731] 0x01 0x00 0x00 0x0f 0xac 0x04 0x01 0x00 | |
[ 476.634192] 0x00 0x0f 0xac 0x02 0x00 0x00 0xd4 0xcc | |
[ 476.645687] =>rtw_wx_set_essid | |
[ 476.654897] ssid=EW, len=2 | |
[ 476.663757] Set SSID under fw_state=0x00000008 | |
[ 476.674480] <=rtw_wx_set_essid, ret 0 | |
[ 482.689276] wpa_set_auth_algs, AUTH_ALG_OPEN_SYSTEM | |
[ 482.700379] set_mode = IW_MODE_INFRA | |
[ 482.710917] |
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
/* eslint-env jasmine */ | |
beforeEach(function() { | |
jasmine.addMatchers({ | |
toBeInstanceOf: (util, customEqualityTesters) => { | |
return { | |
compare: (actual, expected) => { | |
const pass = (actual instanceof expected); | |
return { | |
pass, | |
message: `Expected ${actual} to ${pass ? 'not' : ''} be instance of ${expected}`, |
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 'sqlite3' | |
require 'csv' | |
module ENOC | |
## | |
# Functions to load EnerNOC Open Data (http://open.enernoc.com/data) | |
# into a sqlite database for relational access. This sould be easy | |
# to migrate to Postgres or MariaDB if you want a 'real' database. | |
# | |
module Sql |
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
├── axios@0.7.0 | |
├─┬ babel@5.8.34 | |
│ ├─┬ commander@2.9.0 | |
│ │ └── graceful-readlink@1.0.1 | |
│ ├── convert-source-map@1.1.2 | |
│ ├── fs-readdir-recursive@0.1.2 | |
│ ├─┬ glob@5.0.15 | |
│ │ ├─┬ inflight@1.0.4 | |
│ │ │ └── wrappy@1.0.1 | |
│ │ └── once@1.3.3 |
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
# Add this w/ your other imports: | |
begin | |
require 'aws/s3' | |
require 'yaml' | |
rescue | |
puts "No S3 upload support!" | |
end | |
# and in your config section... | |
s3_config_file = "amazon_s3.yml" # location of file with S3 access key, private key, bucket name |