- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : false, // Standard browser globals e.g. `window`, `document`. | |
"node" : true, |
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
<?php | |
class AcmeController implements ContainerAwareInterface | |
{ | |
use ContainerAwareTrait; | |
use RedirectTrait; | |
public function indexAction() | |
{ | |
return $this->redirect('some_route', [ |
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
<snippet> | |
<content><![CDATA[ | |
<!-- begin $1 --> | |
<div class="$1"> | |
$2 | |
</div> | |
<!-- end $1 --> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>di</tabTrigger> |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
options:{ | |
style:'compressed' | |
}, | |
files: { | |
'css/style.css' : 'scss/style.scss' |
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
<?php | |
/** | |
* Execution time check for: (list/each,foreach) vs (array_walk, array_map, array_reduce, array_filter) | |
* @docs to read | |
* http://www.giorgiosironi.com/2010/02/stop-writing-foreach-cycles.html | |
* http://www.pastie.org/829318 | |
* http://php.net/manual/en/function.array-walk.php#112722 | |
* http://zaemis.blogspot.com/2013/06/building-array-with-arrayreduce.html | |
* (!) http://stackoverflow.com/questions/2473989/list-of-big-o-for-php-functions/2484455#2484455 | |
* http://www.faieta.net/wp/performance-implications-of-closures-in-php/ |
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
<?php | |
// iterator impl: | |
class MapIterator extends IteratorIterator { | |
private $f; | |
public function __construct($f, $inner) { | |
parent::__construct($inner); | |
$this->f = $f; |
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
#!/usr/bin/env php | |
<?php | |
/* | |
* Coding Standards (a.k.a. CS) | |
* | |
* This script is designed to clean up the source files and thus follow coding | |
* conventions. | |
* | |
* @see http://symfony.com/doc/2.0/contributing/code/standards.html | |
* |
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
86937 isset | |
43159 echo | |
31697 empty | |
29252 substr | |
26146 count | |
24248 is_array | |
22572 strlen | |
19365 sprintf | |
18090 unset | |
16584 str_replace |
Linux installation notes (tested under Ubuntu 14.04LTS/12.04LTS), assuming VirtualBox is already installed on host.
OlderNewer