- 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH="/opt/node/bin:$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Creates a signed and zipaligned APK from your Ionic project | |
# | |
# Place your keystore in the root of your project and name it <company>.keystore | |
# Use this script as following : | |
# $ ./release.sh [company] [version] | |
# | |
# Don't forget to gitignore your key and your compiled apks. | |
# |
OlderNewer