- 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
.leaflet-div-icon { | |
background: transparent; | |
border: none; | |
} | |
.leaflet-marker-icon .number{ | |
position: relative; | |
top: -37px; | |
font-size: 12px; | |
width: 25px; |
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
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
L.TileLayer.Common = L.TileLayer.extend({ | |
initialize: function (options) { | |
L.TileLayer.prototype.initialize.call(this, this.url, options); | |
} | |
}); | |
(function () { | |
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 invokee1 = function(err, callback) { | |
// cant change this function | |
callback(); | |
}; | |
var invokee2 = function(err, optional1, optional2, callback) { | |
// work with optional 1 or optional 2 | |
console.log(optional1); | |
console.log(optional2); | |
// cant change this function |
A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
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 | |
/** | |
* The __halt_compiler() function will stop the PHP compiler when called. | |
* You can then use the __COMPILER_HALT_OFFSET__ constant to grab the contents of the PHP file after the halt. | |
* In this example a PHP template is stored after the halt, to allow simple separation of logic from templating. | |
* The template is stored in a temporary file so it can be included and parsed. | |
* | |
* See: https://github.com/bobthecow/mustache.php/blob/dev/src/Mustache/Loader/InlineLoader.php | |
* http://php.net/manual/en/function.halt-compiler.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
-- Update record revision numbers for a region, so they display in Perch. | |
-- Replace :regionID and :revisionNum | |
UPDATE perch2_content_items pci | |
INNER JOIN | |
( | |
SELECT | |
itemID, | |
MAX(itemRev) AS itemRevMax | |
FROM perch2_content_items |
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 | |
/** | |
* Composite Slug Field Type. | |
* | |
* File: PERCH_PATH/addons/fieldtypes/compslug/compslug.class.php | |
* Usage: <perch:content id="slug" type="compslug" for="lastname firstname" suppress="true" /> | |
* @author Jamie York | |
**/ | |
class PerchFieldType_compslug extends PerchFieldType | |
{ |
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 Post | |
{ | |
protected $table = 'posts'; | |
/** | |
* You can define your own custom boot method. | |
* | |
* @return void | |
**/ |
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
$.fn.extend({ | |
// ---- HTML Comments ---- // | |
comments: function() { | |
return $(this).contents() | |
.filter(function() { | |
return this.nodeType == 8; | |
}); | |
}, | |
// ---- Outer HTML ---- // |
OlderNewer