This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# based on http://stackoverflow.com/questions/7052947/split-95mb-json-array-into-smaller-chunks | |
# usage: python json-split filename.json | |
# produces multiple filename_0.json of 1.49 MB size | |
import json | |
import sys | |
with open(sys.argv[1],'r') as infile: | |
o = json.load(infile) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for var in "$@" | |
do | |
#Force file syncronization and lock writes | |
mongo admin --eval "printjson(db.fsyncLock())" | |
#Keep the trailing slash | |
MONGODUMP_DEST="/home/ubuntu/mongobackups/" | |
MONGO_DATABASE="$var" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a minimal frontend to byzanz-record that provides a gui for | |
# selecting a region or window and length of a gif screen-cast. | |
# Depends on xrectsel (part of ffcast), byzanz-record, zenity | |
# Most code stolen from Rob W and MHC http://askubuntu.com/a/201018 | |
DELAY=5 | |
DEFDUR=10 | |
TIME=$(date +"%Y-%m-%d_%H%M%S") | |
USERDUR=$(gdialog --title "Duration?" --inputbox "Please enter the screencast duration in seconds" 200 100 2>&1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2 id="examples">Examples</h2> | |
<p><strong><a href="http://www.ted.com/talks/nicholas_christakis_how_social_networks_predict_epidemics.html">Nicholas Christakis: How social networks predict epidemics</a></strong></p> | |
<p><img src="http://www.well.com/user/abs/Cyb/archive/c3m_1101_pix/EpidemicViz.jpg" alt="The Spread of Flu, Harvard College, 2009" title=""></p> | |
<blockquote> | |
<p>Want to predict the next big epidemic? Map real-life social networks, <br> | |
like friendships and workplace relationships. In this talk from <br> | |
TED@Cannes, Nicholas Christakis shows how monitoring the friends of <br> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
200.times do | |
sleep 1 | |
# data = open('http://localhost/_inc/server.php') | |
puts 'data' | |
end |
NewerOlder