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
/* | |
Script: Color.js | |
Class for creating and manipulating colors in JavaScript. Includes basic color manipulations and HSB <-> RGB <-> HEX Conversions. | |
License: | |
MIT-style license. | |
*/ | |
function Color(type, color, alpha){ | |
this.type = type.toUpperCase(); |
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
Array.implement({ | |
max: function(){ | |
return Math.max.apply(null, this); | |
}, | |
min: function(){ | |
return Math.min.apply(null, 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
Array.prototype.find = function(value){ | |
var result = [], i = 0; | |
for (var i = 0, l = this.length; i < l; i++){ | |
var item = this[i]; | |
if (item == value) result.push(i); | |
} | |
return result; | |
}; | |
Array.prototype.find = function(value){ |
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
Array.implement({ | |
item: function(at){ | |
if (!this.length) return null; | |
if (at < 0) at += this.length; | |
return (at < this.length) ? this[at] : null; | |
}, | |
item: function(at){ | |
if (!this.length || (at < 0 && (at += this.length) && false) || at > this.length) return null; |
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
/* | |
Script: Element.Dimensions.js | |
Contains methods to work with size, scroll, or positioning of Elements and the window object. | |
License: | |
MIT-style license. | |
Credits: | |
- Viewport dimensions based on [YUI](http://developer.yahoo.com/yui/) code, [BSD License](http://developer.yahoo.com/yui/license.html). |
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 $A(iterable){ | |
if (iterable.item){ | |
var array = []; | |
for (var i = 0, l = iterable.length; i < l; i++) array[i] = iterable[i]; | |
return array; | |
} | |
return Array.prototype.slice.call(iterable); | |
}; | |
function $A(iterable){ |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>profile_data</title> | |
<link rel="stylesheet" href="/css/master.css" type="text/css" media="screen" title="no title" charset="utf-8" /> | |
</head> | |
<body> | |
<p> |
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
Array.prototype.kami = function(by){ | |
var a = [], temp = this.slice(0); | |
while (temp.length) a.push(temp.splice(0,by)); | |
return a; | |
}; | |
[0,1,2,3,4,5,6,7].kami(4) |
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
Options +FollowSymLinks +ExecCGI | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule (.*)\.(?:md|markdown)$ /utilities/md2html.php?file=%{REQUEST_FILENAME} [QSA,L] | |
RewriteRule (.*)\.(?:rst)$ /utilities/rst2html.php?file=%{REQUEST_FILENAME} [QSA,L] | |
</IfModule> |
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 python | |
import sys | |
import re | |
re_whitespace = re.compile(r"[ \t]+$") | |
# Remove unnecessary whitespace. | |
lines = [re.sub(re_whitespace, '', line) for line in sys.stdin.readlines()] |
OlderNewer