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
var w = window; | |
var $ = require('jquery'); | |
var esformatter = require('esformatter'); | |
$('.code-pair').each(function () { | |
var $this = $(this); | |
var source = $this.find('.source').text(); | |
var $result = $this.find('.result'); |
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
npm i --save-dev grunt-karma karma karma-chai-sinon karma-chrome-launcher karma-commonjs-plus karma-coverage karma-junit-reporter karma-mocha karma-osx-reporter karma-phantomjs-launcher karma-spec-reporter mocha sinon sinon-chai |
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
var w = window; | |
var $ = require('jquery'); | |
var esformatter = require('esformatter'); | |
$('.code-pair').each(function () { | |
var $this = $(this); | |
var source = $this.find('.source').text(); | |
var $result = $this.find('.result'); |
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
/* =============================================================== */ | |
// The following code is a small example of how to use React to | |
// create a very stupid an simple Cascade Dropdowns. | |
// In this classic type of UI elements the values of the second | |
// dropdown are the result of filtering a data set based on the | |
// value of the previous dropdown. | |
// | |
// In order to demonstrate this, I'm using the Territorial Division | |
// of Peru as an example. | |
// The following component will let the users pick a district. |
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 |
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
var config = { | |
"indent": { | |
"value": " ", | |
"ArrayExpression": 1, | |
"AssignmentExpression": 1, | |
"BinaryExpression": 1, | |
"ConditionalExpression": 1, | |
"CallExpression": 1, | |
"CatchClause": 1, | |
"DoWhileStatement": 1, |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var esformatter = require( 'esformatter' ); | |
var esformatterJSX = require( 'esformatter-jsx' ); | |
var throttle = require( 'lodash.throttle' ); | |
var hash = window.location.hash.substr( 1 ); | |
var extend = require('extend'); | |
var params; |
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
var splitArray = function (origin, chunkSize ) { | |
origin = origin || []; | |
var arr = []; | |
for ( var i = 0, len = origin.length; i < len; i += chunkSize ) { | |
arr.push( origin.slice( i, i + chunkSize )); | |
} | |
return arr; | |
}; |
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
"set nocompatible | |
"source $VIMRUNTIME/vimrc_example.vim | |
"set selectmode=mouse | |
"set backupdir=/tmp | |
"set directory=/tmp | |
set guifont=Monaco:h13 | |
"set guioptions-=T | |
"set errorfile=/tmp/rutkowsk.errors.log | |
"set ic | |
"set fileformats=dos,unix,mac |
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
#!/bin/bash | |
echo "===> install memcached.so in OSX Mavericks" | |
HAVE_PEAR=$(which pear) | |
if [[ $HAVE_PEAR == "" ]] ; then | |
echo '===> no pear found' | |
echo '===> trying to install it...' | |