Skip to content

Instantly share code, notes, and snippets.

Sean O'Connor SeanOC

Block or report user

Report or block SeanOC

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View countown_clock.ino
/*
Udp NTP Client
Get the time from a Network Time Protocol (NTP) time server
Demonstrates use of UDP sendPacket and ReceivePacket
For more on NTP time servers and the messages needed to communicate with them,
see http://en.wikipedia.org/wiki/Network_Time_Protocol
created 4 Sep 2010
View gist:4150612
{
"parameters": [
{
"name": "GIT_BASE_REPO",
"value": "SeanOC/thing"
},
{
"name": "GIT_HEAD_REPO",
"value": "SeanOC/otherThing"
}
View gist:2697978
Traceback (most recent call last):
File "/srv/quimby/shared/env/local/lib/python2.7/site-packages/celery/execute/trace.py", line 192, in trace_task
R = I.handle_error_state(task, eager=eager)
File "/srv/quimby/shared/env/local/lib/python2.7/site-packages/celery/execute/trace.py", line 91, in handle_error_state
}[self.state](task, store_errors=store_errors)
File "/srv/quimby/shared/env/local/lib/python2.7/site-packages/celery/execute/trace.py", line 114, in handle_failure
task.backend.mark_as_failure(req.id, exc, self.strtb)
File "/srv/quimby/shared/env/local/lib/python2.7/site-packages/celery/backends/base.py", line 96, in mark_as_failure
traceback=traceback)
File "/srv/quimby/shared/env/local/lib/python2.7/site-packages/celery/backends/base.py", line 229, in store_result
View gist:1635939
class NoAuthS3Storage(S3BotoStorage):
def __init__(self, *args, **kwargs):
kwargs['querystring_auth'] = False
super(NoAuthS3Storage, self).__init__(*args, **kwargs)
@SeanOC
SeanOC / gist:1174275
Created Aug 26, 2011
Shapry Charges Example
View gist:1174275
from sharpy.product import CheddarProduct
product = CheddarProduct(
username = 'NAME',
password = 'PASS',
product_code = 'PRODUCT',
)
customer = product.get_customer(code='MY-CUSTOMER')
@SeanOC
SeanOC / fails.py
Created Aug 17, 2011
Riak enable_search() problem
View fails.py
>>> import riak
>>> from riak.test_server import TestServer
>>>
>>> riak_bin_path = '/usr/local/Cellar/riak/HEAD/bin/'
>>>
>>> server = TestServer(bin_dir=riak_bin_path)
>>> server.prepare()
>>> server.start()
>>>
>>> client = riak.RiakClient(
@SeanOC
SeanOC / gist:1129040
Created Aug 6, 2011
riaksearch trigger error
View gist:1129040
=CRASH REPORT==== 6-Aug-2011::05:12:41 ===
crasher:
initial call: mi_server:init/1
pid: <0.3488.0>
registered_name: []
exception exit: {{badmatch,{error,enoent}},[{mi_buffer,new,1},{mi_server,read_buffers,4},{mi_server,read_buf_and_seg,1},{mi_server,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}
in function gen_server:init_it/6
in call from proc_lib:init_p_do_apply/3
ancestors: [<0.3487.0>,riak_core_vnode_sup,riak_core_sup,<0.102.0>]
messages: []
View console session
(vagrant@127.0.0.1)1> {ok, Client} = riak:client_connect('riak@10.0.2.15').
{ok,{riak_client,'riak@10.0.2.15',<<3,172,224,28>>}}
(vagrant@127.0.0.1)2> {ok, [R]} = Client:mapred([{<<"groceries">>, <<"mine">>},
(vagrant@127.0.0.1)2> {<<"groceries">>, <<"yours">>}],
(vagrant@127.0.0.1)2> [{'map', {modfun, triggers, count}, 'none', false},
(vagrant@127.0.0.1)2> {'reduce', {modfun, triggers, merge}, 'none', true}]).
** exception error: no match of right hand side value {error,{error,undef,
[{triggers,count,
[{r_object,<<"groceries">>,<<"mine">>,
[{r_content,{dict,2,16,16,8,80,48,
View gist:1065772
soconnor@ip-10-124-91-129:~$ free -m
total used free shared buffers cached
Mem: 15360 10010 5349 0 117 8929
-/+ buffers/cache: 962 14397
Swap: 0 0 0
View gist:1032673
[program:focuslab_worker]
command=/srv/charlotte/current/env/bin/python /srv/charlotte/current/src/manage.py celeryd -Q core,focuslab -E --settings=focuslab_settings
directory=/srv/charlotte/current/src
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/celery/supervisord-celeryd-focuslab.log
user=www-data
stopwaitsecs=10
You can’t perform that action at this time.