Skip to content

Instantly share code, notes, and snippets.

View vanpelt's full-sized avatar
pro

Chris Van Pelt vanpelt

pro
View GitHub Profile
Redis::TimeoutError: Connection timed out
1 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/connection/hiredis.rb" line 55 in rescue in read
2 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/connection/hiredis.rb" line 51 in read
3 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/client.rb" line 238 in block in read
4 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/client.rb" line 226 in io
5 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/client.rb" line 237 in read
6 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/client.rb" line 168 in block in call_pipelined
7 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/client.rb" line 207 in block (2 levels) in process
8 File "/var/deploy/builder/shared/bundle/ruby/2.1.0/gems/redis-3.1.0/lib/redis/client.rb" line 329 in ensure_connected
9 File "/var/deploy/build
module Jabber
def self.read
size = $stdin.read(2).unpack(">h")
$stdin.read(size).split(':')
end
def self.write(success)
answer = success ? 1 : 0
token = "2#{answer}".pack(">hh")
$stdout.write(token)
[javascript:(function()%7Bdocument.getElementsByClassName('table-striped')%5B2%5D.parentElement.style%5B%22overflow%22%5D%20%3D%20%22scroll%22%7D)()](Fix Forgive Buttons)
<chart>
<license>L1X6KZSVV27L.NS5T4Q79KLYCK07EK</license>
<link>
<area url='javascript:full(1800)'/>
</link>
<chart_data>
<row>
thin start --threaded
class GeneralController < ApplicationController
def queue_size
stuff = ""
cur = Thread.current
MQ.new.queue(params[:id] || 'crawls').status do |messages, consumers|
stuff = "#{messages} messages and #{consumers} consumers in #{params[:id] || 'crawls'}"
cur.wakeup
end
def run()
EM.run do
connect_subscribe
end
ensure
AsyncObserver::Queue.queue.connection.close { EM.stop_event_loop }
end
popper = Proc.new do |headers, msg|
if msg == "empty!"
sleep 5
else
job = OpenStruct.new(:ybody => YAML.load(msg), :body => msg, :stats => [], :job_id => headers.properties[:delivery_tag])
safe_dispatch(job)
end
AsyncObserver::Queue.queue.pop &popper
end
AsyncObserver::Queue.queue.pop &popper
Starting all nodes...
Starting node rabbit@fame...
{error_logger,{{2008,11,18},{22,40,8}},"Protocol: ~p: register/listen error: ~p~n",["inet_tcp",einval]}^M
{error_logger,{{2008,11,18},{22,40,8}},crash_report,[[{pid,<0.22.0>},{registered_name,net_kernel},{error_info,{error,badarg}},{initial_call,{gen,init_it,[gen_server,<0.19.0>,<0.19.0>,{local,net_kernel},net_kernel,{rabbit,shortnames,15000},[]]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.19.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,21},{reductions,309}],[]]}^M
{error_logger,{{2008,11,18},{22,40,8}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[rabbit,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}^M
{error_logger,{{2008,11,18},{22,40,8}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,star
BEGIN;
CREATE TEMP TABLE judged AS
SELECT images.id AS id, images.url AS url, images.created_at AS created_at,
units.#{:norm_ if job.norm}bad_count / units.#{:norm_ if job.norm}judgments_count::decimal AS rating
FROM images LEFT OUTER JOIN units ON units.id = images.unit_id
WHERE (images.job_id = #{job.id} AND (images.grouped IS NOT true AND images.inappropriate))
ORDER BY rating DESC, id;
COPY judged TO STDOUT WITH CSV HEADER;
ROLLBACK;
#!/bin/bash
# very helpful is: https://help.ubuntu.com/community/IptablesHowTo -brendan
#
# type: sudo iptables -L to see the current rules
#
set -eu
UPLINK="eth0"
# Change this next line so it lists all your network interfaces, including lo