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
// Puncture a closure, absolute madness | |
Function.prototype.puncture = function(){ | |
var wormhole = function(__cmd__){ | |
return eval(__cmd__); | |
}; | |
var source = ('' + this).match(/function.+?\{([\s\S]*)\}/)[1]; | |
var fn = new Function('this.wormhole=' + wormhole + '\n' + source); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Thomas Aylott</string> | |
<key>comment</key> | |
<string>Thomas Aylott ㊷ subtleGradient.com</string> | |
<key>name</key> | |
<string>Brilliance Black (Inverted)</string> |
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
// Swap classes onload and domready | |
$(function(){ $('html').removeClass('not-ready').addClass('ready'); }); // jQuery | |
$(window).load(function(){ $('html').removeClass('loading').addClass('loaded'); }); | |
// target a specific version | |
if (navigator.isIE == 6){ | |
// do stuff for IE6 | |
} | |
// Deliever different behaviour for a group of IE versions |
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
Titanium.UI.setBackgroundColor('#000'); | |
//Main Tab Group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
//Photo Selection Window | |
var photosWindow = Titanium.UI.createWindow({ | |
url:'photos.js', | |
title:'Photos', | |
backgroundColor:'#fff' |
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
Titanium.UI.setBackgroundColor('#000'); | |
//Main Tab Group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
//Photo Selection Window | |
var photosWindow = Titanium.UI.createWindow({ | |
url:'photos.js', | |
title:'Photos', | |
backgroundColor:'#fff' |
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
(function() | |
{ | |
var _fnMap = {}; | |
$.fn.addClass = function(classes) | |
{ | |
var vs = this; | |
if(!(classes > '') || vs.length == 0) | |
return 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
/** | |
* by Dmitry A. Soshnikov | |
*/ | |
Object.defineProperty(Object, "essence", { | |
value: function objectEssence(value) { | |
var essence = {kind: Object.prototype.toString.call(value).slice(8, -1)}; | |
// use Object(value) just for shortness, it's less effective | |
// than typeof value == "object" && value !== null || typeof value == "function" | |
essence[value === Object(value) ? "object" : "primitive"] = 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
var playhead, art, keyframe1, keyframe2; | |
addEvent('load', function(){ | |
art = new ART(400, 400).inject(document.body); | |
playhead = new ART.Rectangle(200, 200) | |
.inject(art) | |
.fill('#00F'); |
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
//media as attribute | |
%script{:src => "/Theme/HUD/screen.css", :media => "screen and (lsd-theme: HUD)"} | |
//media to deliver combined stylesheet | |
button | |
+inline-block | |
@media (lsd-theme: HUD) | |
button | |
&:icon |
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
/** | |
* This library defines a new style ES objects | |
* which support delegation based mixins. A mixin | |
* chain is stored in the internal [[Mixin]] property. | |
* | |
* Used features: Harmony (ES6) proxies. | |
* | |
* Tested in FF4 beta. | |
* | |
* @author Dmitry A. Soshnikov <dmitry.soshnikov@gmail.com> |
OlderNewer