Skip to content

Instantly share code, notes, and snippets.

@naphthalene
naphthalene / adriennatodela.squarespace.com
Created December 16, 2013 22:26
Lots of packet drops - likely they are overloaded
tsigsty :: ~ » dig adriennatodela.squarespace.com
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> adriennatodela.squarespace.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10762
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;adriennatodela.squarespace.com. IN A
desc: "knife-bs YAML mapping schema"
type: map
mapping:
"organizations":
desc: "Organization listing"
type: map
required: yes
mapping:
"=":
desc: "An organization"
2014-07-22 21:17:36.015 [info] <0.7.0> Application lager started on node 'erchef@127.0.0.1'
2014-07-22 21:17:36.015 [info] <0.7.0> Application public_key started on node 'erchef@127.0.0.1'
2014-07-22 21:17:36.026 [info] <0.7.0> Application ssl started on node 'erchef@127.0.0.1'
2014-07-22 21:17:36.027 [info] <0.7.0> Application epgsql started on node 'erchef@127.0.0.1'
2014-07-22 21:17:36.034 [error] <0.129.0> CRASH REPORT Process <0.129.0> with 0 neighbours exited with reason: bad argument in call to erlang:atom_to_list("sqerl") in pooler_sup:pool_sup_name/1 line 59 in gen_server:init_it/6 line 328
2014-07-22 21:17:36.035 [error] <0.127.0> CRASH REPORT Process <0.127.0> with 0 neighbours exited with reason: {{error,{badarg,[{erlang,atom_to_list,["sqerl"],[]},{pooler_sup,pool_sup_name,1,[{file,"src/pooler_sup.erl"},{line,59}]},{pooler_sup,pool_sup_spec,1,[{file,"src/pooler_sup.erl"},{line,54}]},{pooler_sup,'-init/1-lc$^1/1-1-',1,[{file,"src/pooler_sup.erl"},{line,25}]},{pooler_sup,init,1,[{file,"src/pooler_su
@naphthalene
naphthalene / erchef_crash_log
Created July 22, 2014 21:21
erchef_crash_log
2014-07-22 21:20:11 =CRASH REPORT====
crasher:
initial call: supervisor:pooler_sup/1
pid: <0.129.0>
registered_name: []
exception exit: {{badarg,[{erlang,atom_to_list,["sqerl"],[]},{pooler_sup,pool_sup_name,1,[{file,"src/pooler_sup.erl"},{line,59}]},{pooler_sup,pool_sup_spec,1,[{file,"src/pooler_sup.erl"},{line,54}]},{pooler_sup,'-init/1-lc$^1/1-1-',1,[{file,"src/pooler_sup.erl"},{line,25}]},{pooler_sup,init,1,[{file,"src/pooler_sup.erl"},{line,25}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,233}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}
ancestors: [<0.128.0>]
messages: []
links: [<0.128.0>]
dictionary: []
- "node_ip_address": "127.0.0.1",
- "node_port": "5672",
+ "node_ip_address": "0.0.0.0",
+ "node_port": "8672"
2014-07-22_22:00:51.13530 /opt/chef-server/embedded/service/gem/ruby/1.9.1/gems/amqp-0.6.7/lib/amqp/client.rb:65:in `block in initialize': Could not connect to server 127.0.0.1:8672 (AMQP::Error)
2014-07-22_22:00:51.13534 from /opt/chef-server/embedded/service/gem/ruby/1.9.1/gems/amqp-0.6.7/lib/amqp/client.rb:97:in `call'
2014-07-22_22:00:51.13535 from /opt/chef-server/embedded/service/gem/ruby/1.9.1/gems/amqp-0.6.7/lib/amqp/client.rb:97:in `block in unbind'
2014-07-22_22:00:51.13537 from /opt/chef-server/embedded/service/gem/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `call'
2014-07-22_22:00:51.13538 from /opt/chef-server/embedded/service/gem/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `block in run_deferred_callbacks'
2014-07-22_22:00:51.13539 from /opt/chef-server/embedded/service/gem/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `each'
2014-07-22_22:00:51.13540 from /opt/chef-server/embedded/service/gem/ruby/1.9.
@naphthalene
naphthalene / buckets.py
Created September 28, 2014 15:27
buckets_yo
from itertools import permutations
import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
import pylab
class BucketGraph:
def __init__(self, buckets):
self.buckets = buckets
self.g = nx.DiGraph()
#!/usr/bin/python
from Queue import Queue as Q
class UndirectedGraph:
def __init__(self, vertices, edges):
self.vertices = vertices
self.edges = edges
if not self.validate_edges(self.edges):
print "Invalid Graph"
#!/usr/bin/python
from Queue import Queue as Q
class UndirectedGraph:
def __init__(self, vertices, edges):
self.vertices = vertices
self.edges = edges
if not self.validate_edges(self.edges):
print "Invalid Graph"
#!/usr/bin/python2
from tabulate import tabulate
from random import random
from math import floor
DAYS = 7
SECTIONS = 10
MAX_TTR = 6 # minutes -> max time to read
MIN_TTR = 2