Skip to content

Instantly share code, notes, and snippets.

@scien
scien / gist:8263988
Created January 5, 2014 03:38
mongo --help
MongoDB shell version: 2.4.8
usage: mongo [options] [db address] [file names (ending in .js)]
db address can be:
foo foo database on local machine
192.169.0.5/foo foo database on 192.168.0.5 machine
192.169.0.5:9999/foo foo database on 192.168.0.5 machine on port 9999
options:
--shell run the shell after executing files
--nodb don't connect to mongod on startup - no
'db address' arg expected
;
(function() {
function q(f, g) {
if (!(f instanceof g)) throw new TypeError("Cannot call a class as a function");
}
function r(f, g) {
if (!f) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !g || "object" !== typeof g && "function" !== typeof g ? f : g
}
lass KeenHttpOutput < Fluent::Output
Fluent::Plugin.register_output('out-keen-http', self)
def initialize
super
require 'rubygems'
require 'eventmachine'
require 'em-http-request'
require 'cgi'
require 'json'
@scien
scien / gist:5b94fcd18a4885dcabdf
Created March 24, 2016 11:34
twitch player embed.js
! function(e, t) {
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.video = t() : (e.Twitch = e.Twitch || {}, e.Twitch.video = t())
}(this, function() {
return function(e) {
function t(r) {
if (n[r]) return n[r].exports;
var i = n[r] = {
exports: {},
id: r,
loaded: !1
@scien
scien / gist:cc38b2cba28bbbb30054
Last active December 2, 2016 16:05
iMessages Database
How to connect
> sqlite3 ~/Library/Messages/chat.db
Helpful Commands
sqlite> .help
sqlite> .tables
sqlite> .headers off
sqlite> .headers on
sqlite> .mode line
sqlite> .mode list
@scien
scien / gist:8501640
Created January 19, 2014 07:29
run.sh from week 6 lesson 2 MongoDB for DBAs
#This from the MongoDB University Class M102:MongoDB for DBAs
#This is not an original script by me the author.
#Author Bill Glennon
#Date: January 18, 2014
# run processes for the cluster
# running on as single dev machine as a demo...
# make directories