Skip to content

Instantly share code, notes, and snippets.

Edmond Meinfelder stdarg

Block or report user

Report or block stdarg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View geo_example.js
var MongoClient = require('mongodb').MongoClient;
var async = require('async');
var collection;
var db;
var resultsLimit = 2;
// open connection to local MongoDB server
function(cb) {
View LevelUpIntKey
var levelup = require('level')
var options = {
keyEncoding: 'binary'
//var key = 'name'
var key = 100
// 1) Create our database, supply location and options.
stdarg / ctrim.js
Created Feb 28, 2014
Trim a string
View ctrim.js
* A simple function that creates a new string from inputStr and removes bot h * leading and trailing sep strings.
* @param {String} inputStr The string to be trimmed.
* @param {String} sep The separator string to be trimmed.
* @private
function ctrim(inputStr, sep) {
var str = String(inputStr);
var regExpStr = '^'+sep+'+|'+sep+'+$';
console.log('sep ',sep);
stdarg / fb_errr.js
Created Nov 7, 2013
fivebeans error case
View fb_errr.js
'use strict';
var fivebeans = require('fivebeans');
var client = new fivebeans.client('', 11300);
var inspect = require('util').inspect;
var async = require('async');
var jobid;
var data = { a: 'This is a', b: true, c: 55, d: { e: 'This is e.' } };
var str = JSON.stringify(data);
client.on('connect', function() {
You can’t perform that action at this time.