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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Espresso Soda</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
/** | |
* Creates or decorates an object with observable behavior. | |
* @param {[type]} o object to decorate | |
* @return {[type]} the observable object | |
*/ | |
function makeObservable (o) { | |
var undef; | |
o = o || {}; |
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
Create a git repo and push to remote: | |
mkdir new_git_repo | |
cd new_git_repo | |
git init | |
touch README | |
git add README | |
git commit -m 'first commit' | |
git remote add origin [email protected]/new_git_repo.git | |
git push -u origin master |
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: String.subs('There is no ${foo} foo', { foo: 'bar' }) | |
String.subs = String.subs || function (str, props) { | |
return str.replace(/\$\{([^{}]*)}/g, function (a, b) { | |
var r = props[b]; | |
return typeof r === 'string' || typeof r === 'number' ? r : a; | |
}); | |
}; |
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
<!DOCTYPE html> | |
<!--[if lte IE 6 ]><html class="ie ie6 non-js"><![endif]--> | |
<!--[if IE 7 ]><html class="ie ie7 non-js"><![endif]--> | |
<!--[if IE 8 ]><html class="ie ie8 non-js"><![endif]--> | |
<!--[if gte IE 9 ]><html class="ie ie9 non-js"><![endif]--> | |
<!--[if !IE]>--> | |
<html class="non-js"> | |
<!--<![endif]--> |
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
/* | |
Less mixins (http://css-tricks.com/snippets/css/useful-css3-less-mixins/) | |
*/ | |
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) { | |
text-shadow: @string; | |
} | |
.box-shadow (@string) { | |
-webkit-box-shadow: @string; | |
-moz-box-shadow: @string; | |
box-shadow: @string; |
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
/* | |
Websockets using http://socket.io/ | |
Also with express web mvc framework http://expressjs.com/ | |
*/ | |
var app = require('express').createServer(), | |
io = require('socket.io').listen(app), | |
port = 88; | |
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
alfredapp://customsearch/Search%20JQuery%20API/jquery/ascii/url=http://api.jquery.com/?s={query} |
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
// Example Pseudo-class | |
var Animal = (function() { | |
function Animal(name) { | |
this.name = name; | |
} | |
Animal.prototype.getName = function () { | |
return this.name; | |
}; |
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
/* | |
min, max - jQuery plugins which set css properties to min/max value for the collection | |
@author John Hunter | |
created 2011-11-03 | |
use: $('li.tabs').max('height'); | |
*/ | |
(function ($) { | |
$.fn.max = function (prop) { return foldProp(this, Math.max, prop); }; | |
$.fn.min = function (prop) { return foldProp(this, Math.min, prop); }; |