Skip to content

Instantly share code, notes, and snippets.

@comerford
comerford / mongo_wt_zlib.conf
Last active January 9, 2017 12:08
YAML Config for MongoDB 2.7.9 - WiredTiger, zlib compression
storage:
dbPath: "/ssd/db/wt_zlib"
engine: "wiredTiger"
wiredTiger:
collectionConfig: "block_compressor=zlib"
systemLog:
destination: file
path: "/data/wt_zlib/mongodb.log"
processManagement:
fork: true
@amatellanes
amatellanes / celery.sh
Last active April 19, 2024 11:31
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@drewtm
drewtm / ascii_graph
Created February 18, 2014 22:07
Quick-and-dirty IMU Sensor Graphing
/*
* Here is a sketch that "graphs" the accelerometer and gyroscope data coming from
* the Pololu L3G and LSM303 libraries--by rapidly outputting graphically-arranged
* strings to the Arduino serial monitor. It's much easier than strings of numbers
* to look at and tell whether your sensors are working properly.
*/
#include <Wire.h>
#include <String.h>
#include <L3G.h>
@ollieparsley
ollieparsley / datasift_nodejs_multistreaming.js
Created January 24, 2012 14:58
DataSift Node.JS Multistreaming
//var DataSift = require('/path/to/datasift.js'); //When downloading datasift.js
var DataSift = require('datasift'); //When using npm installation
//Create a new instance of the DataSift consumer
var consumer = new DataSift('username', 'api_key');
//Connect
consumer.connect();
//Emitted when stream is connected