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
// START Handlebars | |
var Handlebars = { | |
precompile: function(){}, | |
compile : function(){}, | |
template : function(){} | |
}; | |
define( 'Handlebars', [], function(){ | |
return Handlebars; | |
}); |
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
{ "description" : "Sproutcore Handlebars Precompiler" | |
, "version" : "0.1.0" | |
, "author" : "Alex Sexton <Alex.Sexton@bazaarvoice.com>" | |
, "engines" : ["node >=0.4.7"] | |
, "main" : "./lib/main" | |
, "dependencies": { | |
"handlebars": "1.0.x" | |
} | |
} |
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 sys = require("sys"); | |
var Handlebars = require("handlebars"); | |
var SC = { Handlebars : {} }; | |
SC.Handlebars.Compiler = function() {}; | |
SC.Handlebars.Compiler.prototype = Object.create( Handlebars.Compiler.prototype ); | |
SC.Handlebars.Compiler.prototype.compiler = SC.Handlebars.Compiler; | |
SC.Handlebars.JavaScriptCompiler = 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
$ gem install bpm | |
Fetching: libgems-0.0.5.gem (100%) | |
Fetching: gemcutter-0.6.1.gem (100%) | |
======================================================================== | |
Thanks for installing Gemcutter! You can now run: | |
gem push merged into RubyGems 1.3.6 | |
gem owner merged into RubyGems 1.3.6 |
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 appView = SC.View.create({ templateName: 'cool-guy-template' }).appendTo('body') |
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
brew install https://raw.github.com/gist/721952/1bd387bf115752380c1d8dbb048bedd1609de520/vim.rb --with-features=huge --enable-interp=ruby,mzscheme,python |
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
// Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
(function(d){if(!d.CFInstall){var e=function(a){return typeof a=="string"?document.getElementById(a):a},f=function(){if(d.a.b)return d.a.c;if(navigator.userAgent.toLowerCase().indexOf("chromeframe")>=0)return!0;if(typeof window.ActiveXObject!="undefined")try{var a=new ActiveXObject("ChromeTab.ChromeFrame");if(a)return a.k(),!0}catch(b){}return!1},g=function(a){try{var b=document.createElement("style");b.setAttribute("type","text/css");b.styleSheet?b.styleSheet.cssText=a:b.appendChild(document.createTextNode(a)); | |
var c=document.getElementsByTagName("head")[0];c.insertBefore(b,c.firstChild)}catch(d){}},h=!1,i=!1,j=function(){if(!i)g(".chromeFrameOverlayContent { display: none; }.chromeFrameOverlayUnderlay { display: none; }"),document.cookie="disableGCFCheck=1;path=/;max-age=31536000000",i=!0},k=function(a){var b=document.createElement("iframe") |
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
/** | |
* Yepnope Once Filter | |
* | |
* by Alex Sexton | |
* WTFPL | |
* | |
* Run this (ideally concatenated into the yepnope minified file) and any script that | |
* you try to include twice will automatically be skipped (but your callback will still run). | |
* | |
*/ |
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
// If you always need jQuery regardless | |
yepnope([ | |
{ | |
load: 'jquery.js' | |
}, | |
{ | |
test: Modernizr.something, | |
nope: 's1.js', | |
complete: function () { | |
$('*').s1(); |
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
#/bin/sh | |
node build/UglifyJS/bin/uglifyjs --extra --unsafe yepnope.js > yepnope.min.js | |
m=$(ls -la yepnope.min.js | awk '{ print $5}') | |
gzip -nfc --best yepnope.min.js > yepnope.min.js.gz | |
g=$(ls -la yepnope.min.js.gz | awk '{ print $5}') | |
echo "$m bytes minified, $g bytes gzipped" | |
rm yepnope.min.js.gz | |
if [ "--test" == "$1" ]; then | |
rm yepnope.min.js | |
fi |