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
<?php | |
// By Yuffster | |
function getDox($file) { | |
$docs = file_get_contents("docs/$file.md"); | |
$funcPatt = "/(.*?)?(Function|Method): (.*?) ?{(#.*?)}?\n/"; | |
$argPatt = "/^[-*1-9]+.*?\(\*(.*?)\*(, optional)?/"; | |
//This docs array will be for all the files and classes. |
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/bash | |
# http://gist.github.com/6731 | |
# author: Duane Johnson | |
# email: duane.johnson@gmail.com | |
# date: 2008 Jun 12 | |
# license: MIT | |
# | |
# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496 | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
require 'pp' | |
class HTMLDoc | |
attr_reader :html | |
attr_reader :doc | |
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
/*IE6 specific code to get hover working for any element*/ | |
#nav li, | |
.something-that-should-support-hover { | |
_azimuth: expression( | |
this.onmousedown = this.onmousedown || new Function("this.className += ' active'"), | |
this.onmouseup = this.onmouseup || new Function("this.className = this.className.replace('active','')"), | |
this.onmouseenter = this.onmouseenter || new Function("this.className += ' hover'"), | |
this.onmouseleave = this.onmouseleave || new Function("this.className = this.className.replace('hover','')"), | |
'inherit' | |
); |
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
* html .shimmed { | |
_azimuth: expression( | |
this.shimmed = this.shimmed || 'shimmed:'+this.insertAdjacentHTML('beforeBegin','<IFRAME style="filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);position:absolute;top:0px;left:0px;width:100%;height:100%" frameBorder=0 scrolling=no src="javascript:'+"''"+'"></IFRAME>'), | |
'inherit' | |
); | |
} |
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
/* Precedence Operator type Associativity Proximity */ //Individual operators ; | |
/* 1 member left-to-right both */ a . b ; | |
/* 1 member left-to-right inside + left */ a [ b ] ; | |
/* 1 new right-to-left right */ new b ; | |
/* 2 function-call left-to-right inside + left */ a ( b ) ; | |
/* 3 decrement n/a right-or-left */ -- b ; | |
/* 3 decrement n/a right-or-left */ a -- ; | |
/* 3 increment n/a right-or-left */ ++ b ; | |
/* 3 increment n/a right-or-left */ a ++ ; | |
/* 4 bitwise-not right-to-left right */ ~ 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
Class.Mutators.Binds = function(self, method_names) { | |
if( method_names === true){ | |
method_names = []; | |
for (var property in self) | |
if(typeof self[property] == 'function') | |
method_names.push(property); | |
} | |
$splat(method_names).each(function(method_name){ | |
var fn = self[method_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
/*Fix the PNG background image so that the contents can still be clicked*/ | |
* html .png-fix-box { | |
background: none; | |
_azimuth: expression(this.bgd = this.bgd || 'bgd:'+this.insertAdjacentHTML('afterBegin','<div class="bg"></div>'),'inherit'); | |
} | |
* html .png-fix-box .bg { | |
display:inline; | |
position: absolute; | |
top: 0px; | |
left: 0px; |
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 $mergeAdd(){ | |
var mix = {}; | |
var obs = Array.flatten(arguments); | |
for (var i = 0, l = obs.length; i < l; i++){ | |
var object = obs[i]; | |
if ($type(object) != 'object') continue; | |
for (var key in object){ | |
var object_prop = object[key], mp = mix[key]; | |
if(mp && $type(object_prop) == 'object' && $type(mp) == 'object') |
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 myTween = new Fx.Tween('myElement', 'background-color', { 'link': 'chain' }); | |
//fade myElement to red, then to white, then to blue | |
myTween.start('#c03').start('#fff').start('#369'); | |
var myMorph = new Fx.Morph('myElement', { 'link': 'cancel' }); | |
//transition myElement to red 16px sized text | |
myMorph.start({ 'color': '#c03', 'font-size': 16 }); | |
//a few ms later... stop right there! make that blue 10px text with a height of 100px | |
myMorph.start({ 'color': '#369', 'font-size': 10, 'height': 100 }); | |