Skip to content

Instantly share code, notes, and snippets.

View philipobrien's full-sized avatar

Philip O'Brien philipobrien

View GitHub Profile
[{u'Date': datetime.datetime(2008, 3, 30, 23, 0), u'Events': 0.0, u'ID': u'116927302'}, {u'Date': datetime.datetime(2008, 3, 30, 9, 49), u'Events': 2401.0, u'ID': u'116927302'}, {u'Date': datetime.datetime(2008, 3, 30, 23, 0), u'Events': 0.0, u'ID': u'116927307'}, {u'Date': datetime.datetime(2008, 3, 30, 0, 0), u'Events': 0.0, u'ID': u'116927307'}, {u'Date': datetime.datetime(2008, 3, 30, 23, 0), u'Events': 0.0, u'ID': u'121126919'}, {u'Date': datetime.datetime(2008, 3, 30, 9, 33), u'Events': 1019.0, u'ID': u'121126919'}, {u'Date': datetime.datetime(2008, 3, 30, 0, 0), u'Events': 0.0, u'ID': u'121126922'}, {u'Date': datetime.datetime(2008, 3, 30, 23, 0), u'Events': 0.0, u'ID': u'121126922'}, {u'Date': datetime.datetime(2008, 3, 30, 0, 0), u'Events': 0.0, u'ID': u'121127133'}, {u'Date': datetime.datetime(2008, 3, 30, 23, 0), u'Events': 0.0, u'ID': u'121127133'}, {u'Date': datetime.datetime(2008, 3, 30, 23, 0), u'Events': 0.0, u'ID': u'131677370'}, {u'Date': datetime.datetime(2008, 3, 30, 0, 0), u'Events': 0.0,
@philipobrien
philipobrien / ipython_notebook_in_git.md
Created June 29, 2016 14:10 — forked from pbugnion/ ipython_notebook_in_git.md
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.

@philipobrien
philipobrien / osx-mongodb-rlimits-fix.md
Last active September 1, 2015 13:25 — forked from tamitutor/osx-mongodb-rlimits-fix.md
Fix Mongodb "soft rlimits" Warning On Mac OS X (Yosemite)

If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 when you login to mongo shell via mongo from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.

(Source of this how to found at basho/basho_docs#1402)

First file: sudo vi /Library/LaunchDaemons/limit.maxfiles.plist

...containing:

@philipobrien
philipobrien / logstash-cloudlet.conf
Created November 21, 2014 11:46
Logstash conf file for OPENi cloudlet platform logging
input {
file {
path => "/opt/openi/cloudlet_platform/logs/cloudletPlatform.log"
codec => "json"
}
}
output {
elasticsearch {
[xdcr:error,2014-11-06T10:04:26.951,ns_1@127.0.0.1:<0.5832.0>:xdc_vbucket_rep:terminate:489]Replication (CAPI mode) `f4268e62702130298bf87f17cc481219/openi/openi` (`openi/545` -> `http://*****@10.0.2.15:9091/openi%2f545`) failed: {http_request_failed,"POST",
"http://admin:*****@10.0.2.15:9091/openi%2f545/_bulk_docs",
{error,{code,500}}}
[xdcr:error,2014-11-06T10:04:26.998,ns_1@127.0.0.1:<0.6854.0>:xdc_vbucket_rep:terminate:489]Replication (CAPI mode) `f4268e62702130298bf87f17cc481219/openi/openi` (`openi/825` -> `http://*****@10.0.2.15:9091/openi%2f825`) failed: {http_request_failed,"POST",
"http://admin:*****@10.0.2.15:9091/openi%2f825/_bulk_docs",
{error,{code,500}}}
[xdcr:error,2014-11-06T10:04:27.013,ns_1@127.0.0.1:<0.6321.0>:xdc_vbucket_rep:terminate:489]Replication (CAPI mode) `f4268e62702130298bf87f17cc481219/openi/openi` (`openi/559` -> `http://*****@10.0.2.15:9091/openi%2f559`) failed: {http_request_failed,"POST",
[2014-11-06 10:03:24,021][INFO ][node ] [Cutthroat] version[1.3.0], pid[5879], build[1265b14/2014-07-23T13:46:36Z]
[2014-11-06 10:03:24,021][INFO ][node ] [Cutthroat] initializing ...
[2014-11-06 10:03:24,045][INFO ][plugins ] [Cutthroat] loaded [transport-couchbase], sites [kopf, head]
[2014-11-06 10:03:26,710][INFO ][node ] [Cutthroat] initialized
[2014-11-06 10:03:26,710][INFO ][node ] [Cutthroat] starting ...
[2014-11-06 10:03:26,963][INFO ][org.eclipse.jetty.server.Server] jetty-8.1.0.v20120127
[2014-11-06 10:03:27,039][INFO ][org.eclipse.jetty.server.AbstractConnector] Started SelectChannelConnector@0.0.0.0:9091
[2014-11-06 10:03:27,040][INFO ][transport.couchbase ] [Cutthroat] bound_address {inet[0.0.0.0/0.0.0.0:9091]}, publish_address {inet[/10.0.2.15:9091]}
[2014-11-06 10:03:27,120][INFO ][transport ] [Cutthroat] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.0.