This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
sudo yum update | |
sudo yum install python27 | |
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | sudo /usr/bin/python27 | |
sudo easy_install pip | |
echo "alias python='python27'" >> ~/.bashrc | |
source ~/.bashrc |
// webpack is a module bundler | |
// This means webpack takes modules with dependencies | |
// and emits static assets representing those modules. | |
// dependencies can be written in CommonJs | |
var commonjs = require("./commonjs"); | |
// or in AMD | |
define(["amd-module", "../file"], function(amdModule, file) { | |
// while previous constructs are sync | |
// this is async |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
AsyncProcess = require('./async-process').AsyncProcess | |
describe('AsyncProcess', function() { | |
var asyncProcess; | |
beforeEach(function() { | |
asyncProcess = new AsyncProcess(); | |
}); | |
it('should process 42', function() { |
if ( ![].fill) { | |
Array.prototype.fill = function( value ) { | |
var O = Object( this ); | |
var len = parseInt( O.length, 10 ); | |
var start = arguments[1]; | |
var relativeStart = parseInt( start, 10 ) || 0; | |
var k = relativeStart < 0 | |
? Math.max( len + relativeStart, 0) | |
: Math.min( relativeStart, len ); |
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install
will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
var Table = React.createClass({ | |
render: function render() { | |
var _self = this; | |
var thead = React.DOM.thead({}, | |
React.DOM.tr({}, | |
this.props.cols.map(function (col) { | |
return React.DOM.th({}, col); | |
}))); |
#!/usr/bin/env node | |
var program = require('commander'); | |
var request = require('request'); | |
var chalk = require('chalk'); | |
program | |
.version('0.0.1') | |
.usage('[options] <keywords>') | |
.option('-o, --owner [name]', 'Filter by the repositories owner') |
I wanted to figure out the fastest way to load non-critical CSS so that the impact on initial page drawing is minimal.
TL;DR: Here's the solution I ended up with: https://github.com/filamentgroup/loadCSS/
For async JavaScript file requests, we have the async
attribute to make this easy, but CSS file requests have no similar standard mechanism (at least, none that will still apply the CSS after loading - here are some async CSS loading conditions that do apply when CSS is inapplicable to media: https://gist.github.com/igrigorik/2935269#file-notes-md ).
Seems there are a couple ways to load and apply a CSS file in a non-blocking manner:
'use strict'; | |
var | |
chalk = require('chalk'), | |
gulp = require('gulp'), | |
clean = require('gulp-clean'), | |
concat = require('gulp-concat'), | |
deporder = require('gulp-deporder'), | |
gulpif = require('gulp-if'), |