I hereby claim:
- I am dolinsky on github.
- I am davidolinsky (https://keybase.io/davidolinsky) on keybase.
- I have a public key ASBFkMq5iZR99b3mFI63Yt1CphWCwpPiv1v6l5aXjPSRXwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| from sandman import app | |
| from flask.json import JSONEncoder | |
| class CustomJSONEncoder(JSONEncoder): | |
| def default(self, obj): | |
| try: | |
| if isinstance(obj, date): | |
| return obj.isoformat() |
Having trouble installing the latest stable version of tmux?
Save yourself some time and run this little fellow!
| # Print summary of hostnames mongod has open connections to | |
| sudo lsof | grep TCP | grep mongod | awk ' | |
| BEGIN {} | |
| { | |
| split($9,p,":"); | |
| conn = p[1] p[2]; | |
| conns[conn]++; | |
| } | |
| END { for (c in conns) { | |
| printf "%s\t%d\n", c, conns[c] |
| javascript:(function(){var d=document.getElementById("mw-sopaOverlay");d.setAttribute("style","display: none");var a=["mw-page-base","mw-head","mw-panel","mw-head-base","content","footer"];for(var i=0;i<a.length;i++){var d=document.getElementById(a[i]);d.setAttribute("style","display: block")}})(); |
| <?php | |
| function getReplicationInfo($m) { | |
| $db = $m->local; | |
| $result = array(); | |
| $ol = $db->system->namespaces->findOne(array("name" => 'local.oplog.$main')); | |
| if ($ol && array_key_exists('options', $ol)) { | |
| $result['logSizeMB'] = $ol['options']['size'] / 1000 / 1000; |