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[ | |
; +------------------------------+ | |
; | Chain route: ${1:routeName} | |
; +------------------------------+ | |
resources.router.routes.${1}.type = Zend_Controller_Router_Route_Chain | |
resources.router.routes.${1}.chain = "${2}, ${3}$0" | |
]]></content> | |
<tabTrigger>zf-route-chain</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
// Child class | |
function Dog() { | |
// Call parent constructor | |
Pet.call(this); | |
// Override parents name-property | |
this.name = 'Ceasar'; | |
} |
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
/** | |
* @see http://javascript.crockford.com/prototypal.html | |
*/ | |
if (typeof Object.create !== 'function') { | |
Object.create = function(o) { | |
var F = function() {}; | |
F.prototype = o; | |
return new 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
// v1 | |
var iframe = $('#iframe-id').context; | |
$('selector', $(iframe) ). | |
// v2 | |
var $iframe = $('#iframe-id').contents(); | |
$iframe.find('selector'); |
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
/** | |
* @see http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript#answer-13403498 | |
* @see https://gist.github.com/jed/982883 | |
*/ | |
function b(a){return a?(a^Math.random()*16>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)}; | |
var uuid = b(); |
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
git clone -b devel https://github.com/dz0ny/LiveReload-sublimetext2.git LiveReload |
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
jQuery.fn.otherwise = function() { | |
/* @see https://groups.google.com/forum/#!topic/jquery-en/a-KhJ4IqEI0 */ | |
return this.end().not(this); | |
}; |
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
--- | |
layout: post | |
title: Part two on how I built my blog | |
category: Coding | |
tags: jekyll github rss | |
year: 2012 | |
month: 3 | |
day: 22 | |
published: true | |
summary: A follow up post on how I built my blog |
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
/*global window, define */ | |
var FacebookConnect = { | |
options: { | |
appId: null, // {String} Your application ID | |
cookie: true, // {Boolean} Enables cookies to allow the server to access the session | |
logging: true, // {Boolean} Disable logging | |
session: null, // {Object} Use specified session object | |
status: true, // {Boolean} Fetch fresh status |
OlderNewer