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
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough [email protected] | |
/** | |
* You can pass in a random number generator object if you like. | |
* It is assumed to have a random() method. | |
*/ |
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
/* getWeek returns an ISO 8601 week for any Date object. | |
* | |
* as far as i know, it handles all the weird boundary | |
* conditions that come up, even by a millisecond. | |
* no license, go nuts or whatever, or don't | |
* [email protected] | |
*/ | |
Date.prototype.getWeek = function() { | |
var fm = function(fullyear){ | |
// return a date for the first monday in a year |
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
/* Allows js Dates to return an object with formatted information | |
* | |
* The object has the same signature as php.net/date, so you can | |
* use that table to look up what the keys are. | |
* Most numbers are returned as strings so they can be 0 padded. | |
* not all keys are represented, but it's enough to save you time. | |
* no license, go nuts or whatever, or don't | |
* [email protected] | |
*/ | |
Date.prototype.format = 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
var junkify = function( someClass ){ | |
// requires underscore.js | |
var sparks = document.getElementsByClassName( someClass ); | |
_(sparks).each(function(e,i){ | |
var range = 16; | |
var origContent = e.innerHTML; | |
e.title = "data: "+ origContent; | |
var d = origContent.split(","), | |
max = _.max(d), min = _.min(d), | |
dataRange = max-min; |
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
#!env python | |
""" | |
artboard.py - (c) 2012 marcos.a.ojeda <[email protected]> | |
--"Quis leget haec?" | |
requires: | |
graphicsmagick - brew install graphicsmagick | |
ghostscript - brew install ghostscript | |
macfsevents - pip install MacFSEvents |
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(){ | |
$(".project_list a").click( | |
function(evt){ | |
evt.preventDefault(); | |
var dest = $(this).attr("href"); // the link destination | |
$('html,body').animate({scrollTop: $(dest).offset().top},'slow', | |
function(){window.location.hash = dest} // change the window hash | |
); | |
} | |
) |
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 | |
# | |
# beforeRunningCommand: nop | |
# input: selection | |
# inputFormat: text | |
# keyEquivalent: ^@k | |
# name: link to kiln | |
# outputCaret: afterOutput | |
# outputFormat: text | |
# outputLocation: toolTip |
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
""" | |
doodler.py - (c) 2012 Marcos Ojeda <[email protected]> | |
--"Quis leget haec?" | |
requires | |
graphicsmagick - brew install graphicsmagick | |
ghostscript - brew install ghostscript | |
""" |
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
g++ -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -I../src/gpacmp4 -o ccextractor $(find ../src/ -name '*.cpp') $(find ../src/ -name '*.c') |
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 wwdiff () { | |
if [[ -f $1 && -f $2 ]]; then | |
wdiff -n\ | |
-w $'\033[30;31m\033[4m' -x $'\033[0m'\ | |
-y $'\033[30;32m' -z $'\033[0m'\ | |
$1 $2 | less -R | |
fi | |
} |
OlderNewer