Skip to content

Instantly share code, notes, and snippets.

@scien
scien / gist:1aa67fc1e45de313d05c
Last active October 24, 2015 01:19
twitch player - 2015-10-23
We couldn’t find that file to show.
#!/bin/bash
# credit: Robert Larsen
function create_shard(){
shard=$1
repl_factor=$2
shard_name="shard_${shard}"
shard_dir=shard${shard}
init='rs.initiate({_id:"'${shard_name}'",members:['
@scien
scien / gist:ea853fe6d08d36d99af8
Created February 19, 2015 18:02
open github issues
$('.issue-title-link').each(function(i, el) {
window.open($(el).attr('href'), '_blank')
});
@scien
scien / gist:54694d0e0180b9ac9b91
Created September 10, 2014 05:22
prune a file from git history
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch target_file.ext’ --prune-empty --tag-name-filter cat -- --all
initKeenIO: (project_id, write_key) ->
window.Keen = window.Keen || {
configure: (e) ->
this._cf = e
addEvent: (e,t,n,i) ->
this._eq = this._eq || []
this._eq.push [e,t,n,i]
setGlobalProperties: (e) ->
this._gp = e
onChartsReady: (e) ->
> mongoimport --help
Import CSV, TSV or JSON data into MongoDB.
When importing JSON documents, each document must be a separate line of the input file.
Example:
mongoimport --host myhost --db my_cms --collection docs < mydocfile.json
options:
--help produce help message