- 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 hidden or 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 strict'; | |
module.exports = function (grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
lintspaces: { | |
all: { | |
src: ['./src/**/*.js'], |
This file contains hidden or 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 |
- 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
- Compass - Open source CSS Authoring Framework.
- Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
- Font Awesome - The iconic font designed for Bootstrap.
- Zurb Foundation - Framework for writing responsive web sites.
- SASS - CSS extension language which allows variables, mixins and rules nesting.
- Skeleton - Boilerplate for responsive, mobile-friendly development.
This file contains hidden or 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 a local version of Cordova when possible | |
alias cordova=exec_cordova_local | |
# Determine cordova version to use | |
exec_cordova_local() { | |
# Default path Cordova should be at if installed... | |
cpath="/usr/local/lib/node_modules/cordova/bin/cordova" | |
if [ -e node_modules/.bin/cordova ] | |
then |
This file contains hidden or 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
// Assumes you've included the async library | |
var async = window.async | |
, userInput = $('input').val() // <== just an example, could use ng-model too in angular | |
, originalList = getTheHugeDataSetFromSomewhere() | |
, $scope.items = []; | |
async.filter(originalList, function (item, cb) { | |
// Check does the user input exist in the name |
This file contains hidden or 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
for log in `fhc app logs list --app=irfeeciv4vf3uxwnlchbjwuj --env=tke-test --json\ | |
| \grep -i "std" | sed 's/.*"\(.*\)"[^"]*$/\1/'`; do \ | |
fhc app logs get --logname="$log" --app=irfeeciv4vf3uxwnlchbjwuj --env=tke-test --verbose; done > output.txt |
This file contains hidden or 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 strict'; | |
var Promise = require('bluebird') | |
, express = require('express'); | |
var app = express(); | |
async function getUsers () { | |
return new Promise(function (resolve, reject) { | |
resolve(['jane', 'john']); |
This file contains hidden or 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 strict'; | |
var express = require('express') | |
, async = require('async'); | |
var app = express(); | |
function getAges (callback) { | |
callback(null, ['23', '43']); | |
} |
This file contains hidden or 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
Every second run is using async await, i.e 1 & 3 uses the callback server, and 2 & 4 use async await. | |
eshortis@eshortis-OSX:~/workspaces/personal/aysnc-await$ ab -n 10000 -c 250 -r http://127.0.0.1:3001/ | |
This is ApacheBench, Version 2.3 <$Revision: 1663405 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 127.0.0.1 (be patient) | |
Completed 1000 requests |
OlderNewer