Skip to content

Instantly share code, notes, and snippets.


Wamburu wamburu

Block or report user

Report or block wamburu

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
wamburu / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
wamburu /
Last active Aug 29, 2015 — forked from jookyboi/
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.


  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
wamburu / clickapp.js
Last active Jan 5, 2018
ClickSend Arduino
View clickapp.js
var SerialPort = require("serialport").SerialPort,
express = require('express'),
bodyParser = require('body-parser');
// initialize a sample request function
//This request will be posted once the server is started
var request = require('request');
method: 'POST',
wamburu / clicksendarduino.ino
Created Oct 29, 2015
Arduino code to receive sms from clicksend and display in LCD.
View clicksendarduino.ino
#include <Wire.h>
#include "rgb_lcd.h"
rgb_lcd lcd;
void setup()
// set up the LCD's number of columns and rows:
wamburu / .js
Last active Nov 23, 2015
Install Nodejs in RaspberryPI
View .js
wamburu /
Created Feb 21, 2016 — forked from solderjs/
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set "Your Name"
npm set ""
npm set ""

npm adduser
wamburu / mongoose-datequery
Created Apr 1, 2016
Query Data From Mongoose and Filter Depending on Date
View mongoose-datequery
"date": {
'$gte': new Date('4/1/2016'),
'$lt': new Date('4/30/2016')
// will show data for the month of April
function(err, obj) {
if (err) return console.error(err);
wamburu / authfb.js
Created Jun 24, 2016
Firebase Authentication with facebook
View authfb.js
var dataRef = new Firebase('https://<your-firebase>');
facebookConnectPlugin.login(['public_info'], function(status) {
facebookConnectPlugin.getAccessToken(function(token) {
// Authenticate with Facebook using an existing OAuth 2.0 access token
dataRef.authWithOAuthToken("facebook", token, function(error, authData) {
if (error) {
console.log('Firebase login failed!', error);
} else {
console.log('Authenticated successfully with payload:', authData);
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
wamburu / momentjs.humanized.triplesplit.time.js
Created Sep 24, 2016 — forked from James1x0/momentjs.humanized.triplesplit.time.js
Get a humanized, "Morning", "Afternoon", "Evening" from moment.js **Great for user greetings!**
View momentjs.humanized.triplesplit.time.js
function getGreetingTime (m) {
var g = null; //return g
if(!m || !m.isValid()) { return; } //if we can't find a valid or filled moment, we return.
var split_afternoon = 12 //24hr time to split the afternoon
var split_evening = 17 //24hr time to split the evening
var currentHour = parseFloat(m.format("HH"));
if(currentHour >= split_afternoon && currentHour <= split_evening) {
You can’t perform that action at this time.