Skip to content

Instantly share code, notes, and snippets.

View monbro's full-sized avatar

Michael Klein monbro

View GitHub Profile
var AUTH_URL = "https://api.glitch.com/oauth2/authorize?response_type=code&client_id=000yourclientid000&redirect_uri=http://yoursitehere/oauth/&scope=identity";
var Auth_Router = Backbone.Router.extend({
routes: {
"": "root",
"oauth/?code=:code": "auth"
},
root: function () {},
auth: function (code) {
Meteor.call('authenticate', code, function (error, result) {
http://uploads.makevoid.com/jquery_dom_highlighter.html
@monbro
monbro / mongodb
Last active December 18, 2015 22:19 — forked from pasviegas/mongodb
mongodb monit debian script (not tested yet)
check process mongodb with pidfile /var/lib/mongodb/mongod.lock
group database
start program = "/usr/bin/mongod --dbpath /var/lib/mongodb --logpath /var/log/mongodb/mongodb.log --config /etc/mongodb.conf run"
stop program = "/usr/bin/pkill -f mongod"
if failed host 127.0.0.1 port 27017 protocol http
and request "/" with timeout 10 seconds then restart
if 5 restarts within 5 cycles then timeout
@monbro
monbro / 0_reuse_code.js
Created September 30, 2013 09:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<script>
Keen.onChartsReady(function() {
var client1 = new Keen.Client({
projectId: "...",
readKey: "..."
});
var client2 = new Keen.Client({
projectId: "...",
readKey: "..."