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
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
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
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
# run with rainbows -c rainbows.config.rb | |
require 'rainbows' | |
listen 8888 # by default Unicorn listens on port 8080 | |
worker_processes 9 # this should be >= nr_cpus | |
pid "unicorn.pid" | |
#stderr_path "unicorn.log" | |
#stdout_path "unicorn.log" | |
# nuke workers after 30 seconds instead of 60 seconds (the default) | |
timeout 30 |
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
/* Collapse Google Reader iframe ad frames */ | |
@-moz-document url-prefix(https://www.google.com/reader/), | |
url-prefix(http://www.google.com/reader/) { | |
/* Make the search bar take up less vertical space */ | |
#top-bar { height: 44px !important; } | |
#search { padding: 8px 0 !important; } | |
/* make the 'subscribe' bar take up less vertical space */ | |
#viewer-header, #lhn-add-subscription-section { height: 42px !important; } | |
/* Right panel */ |
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
/** | |
* Node builder. Call like: | |
* $n('div',{class:'top'},'inner text') // or: | |
* $n('div',{class:'top'},[$n('p',{},'nested element']) | |
*/ | |
$n= function(e,attrs,inner) { | |
if(typeof(e)=='string') e = document.createElement(e); | |
if (attrs) for (var k in attrs) e.setAttribute(k,attrs[k]); | |
if (inner) { | |
if (typeof(inner)=='string') e.textContent = inner; |
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
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.content.res.TypedArray; | |
import android.preference.DialogPreference; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import com.quietlycoding.android.picker.NumberPicker; | |
public class NumberPickerPreference extends DialogPreference { |
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
%%% Sends a message back & forth | |
%%% Author: Thom Nichols | |
%%% | |
%%% Remote server communication demo. | |
%%% Use start_listener/1 to register a listener on a remote or local node. | |
%%% use send/2 to send a messge to a node and listen for its response. | |
-module(echo). | |
-author('Thom Nichols'). | |
-import(erlang). |
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
import Queue as _oldQueue | |
import heapq | |
from time import mktime, time as _time | |
class PriorityQueue(_oldQueue.PriorityQueue): | |
''' | |
This class extends Python's Queue.PriorityQueue by allowing it to | |
evict lower priority items in order to make room. This avoids a | |
starvation problem where low-priority items fill the queue and prevent | |
a high-priority item from being inserted. |
NewerOlder