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 Rakefile | |
# | |
# Contains the following tasks: | |
# | |
# build:all # Build all source files | |
# build:auto # Autobuild all source files | |
# build:compress # Compresses and munges output JS using YUI Compressor | |
# build:css # Build CSS files from SASS source | |
# build:js # Assemble output javascript file(s) |
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
// ads.js v0.1 by M@ McCray, find the source at http://gist.github.com/252391 | |
var Ads=(function(B){function A(D){var C=B.location.search.substring(1);var G=C.split("&");for(var E=0;E<G.length;E++){var F=G[E].split("=");if(F[0]==D){return F[1]}}return""}return{Google:function(D,F,E,C){B.google_ad_client=D;B.google_ad_slot=F;B.google_ad_width=E;B.google_ad_height=C;document.write('<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js"><\/script>')},ProjectWonderful:function(J,G,D,F){var I=document,H=new String(Math.random()*9999).substr(0,5),E='<script src="http://www.projectwonderful.com/gen.php?',C=A("pw_highlight_code");E+="id="+J+"&";E+="type="+G+"&";E+="r="+H+"&";if(I.referrer){E+="referer="+escape(I.referrer)+"&"}if(I.location){E+="location="+escape(I.location);+"&"}if(D){E+="fg="+D+"&"}if(F){E+="bg="+escape(F)+"&"}if(C!=""){E+="hl="+escape(C.match(/[0-9]+/g))}E+='"><\/script>';I.write(E)}}})(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
/* View Builder for JavaScript with support for CommonJS (and therefore Node.js) | |
By M@ McCray - 01/31/2010 | |
Usage Example: | |
View.register('_footer', function(content){ | |
return div({ cls:'footer'}, | |
div({ cls:'footer-content' }, | |
content | |
) |
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
# Goes in your .bash_rc or .profile | |
# Hides the icons from your desktop | |
desktop_hide() { | |
defaults write com.apple.finder CreateDesktop -bool false | |
killall Finder | |
} | |
# Show the icons from your desktop | |
desktop_show() { |
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
// (Simple example of using platform.js in a jQuery plugin.) | |
// Usage: $('#block').anim8({ top:50, left:350 }, 250); | |
$.fn.anim8 = (function($){ return platform({ | |
// For Webkit browsers it will use CSS animations | |
webkit: function(props, speed, transition) { | |
return this.each(function(){ | |
var elem = $(this), | |
transition = transition || 'ease-out', |
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
/* | |
Version 0.2 | |
module("Boldr", function(ns) { with(ns) { | |
module("Hello", function() { | |
def("hello", function() { | |
alert("hello " + this.name); | |
}); | |
}); | |
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
Class.extend({ | |
callback: function() { | |
if(arguments.length == 0 || typeof arguments[0] != "string") { throw "You must specify a method name (as a String)"; }; | |
var self = this, | |
args = Array.prototype.slice.call(arguments), | |
name = args.shift(), | |
meth = self[name]; | |
if (typeof meth === 'function') { return function curriedMethod() { | |
return meth.apply(self, args.concat(Array.prototype.slice.call(arguments))); | |
}; |
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
person: { | |
name: 'matt' | |
age: 34 | |
} | |
ok 'name' of person # OF tests object property names | |
ok 'matt' in person # IN tests object values (CURRENTLY FAILS) | |
brothers: ['matt', 'dan', 'sam'] |
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
### | |
Web Toolkit v0.4 (by M@ McCray) | |
http://gist.github.com/515035 | |
NOTE: This is meant to be used as a Cakefile (Coffee's RAKE equivalent). | |
### | |
COFFEE_SRC="source/coffee" |
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
# Wrap sudo to handle aliases and functions | |
# Wout.Mertens@gmail.com | |
# | |
# Comments and improvements welcome | |
sudo () | |
{ | |
local c o t parse | |
# Parse sudo args |