start new:
tmux
start new with session name:
tmux new -s myname
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) { |
var dataRef = new Firebase('https://<your-firebase>.firebaseio.com'); | |
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); |
myModel.find({ | |
"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); | |
console.log(obj); |
PATH="/opt/node/bin:$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin" |
#include <Wire.h> | |
#include "rgb_lcd.h" | |
rgb_lcd lcd; | |
void setup() | |
{ | |
Serial.begin(9600); | |
// set up the LCD's number of columns and rows: |
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'); | |
request({ | |
method: 'POST', |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |