Skip to content

Instantly share code, notes, and snippets.

@comerford
comerford / mongo_wt_zlib.conf
Last active Jan 9, 2017
YAML Config for MongoDB 2.7.9 - WiredTiger, zlib compression
View mongo_wt_zlib.conf
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 May 4, 2022
Celery handy commands
View celery.sh
/* 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 Feb 18, 2014
Quick-and-dirty IMU Sensor Graphing
View ascii_graph
/*
* 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>
View datasift_nodejs_multistreaming.js
//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