Skip to content

Instantly share code, notes, and snippets.

View bobbydams's full-sized avatar

Bobby Drake bobbydams

View GitHub Profile
@bobbydams
bobbydams / cloudSettings
Last active April 2, 2020 12:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-02T12:06:20.964Z","extensionVersion":"v3.4.3"}

Keybase proof

I hereby claim:

  • I am bobbydams on github.
  • I am bobbydrake (https://keybase.io/bobbydrake) on keybase.
  • I have a public key ASDkHPv5sSgL9cc1W0W1Ew1Nwh8Wls-KCPzbjKmNX2gGgwo

To claim this, I am signing this object:

@bobbydams
bobbydams / yield
Last active December 27, 2015 15:59
def get(self, collection='',filter=None, callback=None):
cursor = self.db[collection].find(filter)
data = yield cursor.to_list(length=1000)
for doc in data:
if '_id' in doc and isinstance(doc['_id'], ObjectId):
doc['_id'] = str(doc['_id'])
callback(data)
@bobbydams
bobbydams / Supervisord Upstart Script
Last active December 21, 2015 00:28
Upstart Script for Supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@bobbydams
bobbydams / Upstart Script for MongoDB
Last active December 21, 2015 00:19
Upstart Scripts for MongoDB and Mongos
#!/bin/sh
### BEGIN INIT INFO
# Perfect UPSTART SCRIPT
# Provides: mongodb
# Required-Sart:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mongodb
@bobbydams
bobbydams / README
Last active December 13, 2015 22:49 — forked from sasha-id/README
MongoDB upstart scripts for Ubuntu.
Run following commands after installing upstart scripts:
ln -s /lib/init/upstart-job /etc/init.d/mongoconf
ln -s /lib/init/upstart-job /etc/init.d/mongodb
ln -s /lib/init/upstart-job /etc/init.d/mongos
To start services use: