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
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
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 Track(context) { | |
function addEvent(type, fn) { | |
// context is scoped in Track object | |
context.addEventListener(type, fn, false); | |
return addEvent; | |
} | |
function getXY(event) { | |
return { | |
x: (event.pageX || event.touches[0].pageX) - document.body.scrollLeft, |
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
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
var metas = document.getElementsByTagName('meta'); | |
var i; | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i=0; i<metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
} | |
} |
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 | |
# +----------------------------------------------------------------------+ | |
# | | | |
# | Mount the root file system / with the option noatime | | |
# | | | |
# | By Philipp Klaus <http://blog.philippklaus.de> | | |
# | Tip found on <http://blogs.nullvision.com/?p=275> | | |
# | | | |
# +----------------------------------------------------------------------+ |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 MoogPlus = new Class({ | |
Extends: Fx.Morph, | |
options: { | |
rowSelector: '.row', | |
activeClass: 'active', | |
event: 'click', | |
'class': 'MoogPlus', |
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
# | |
# @author Jonathon byrd | |
# | |
############################################################ | |
# first things first, set your iptables for a web server. If you jack these | |
# up you don't want to have to re-install your os after doing much more. | |
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/ | |
# and | |
# @see https://help.ubuntu.com/community/IptablesHowTo |
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
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt | |
sudo mv add-apt-repository.sh.txt /usr/sbin/add-apt-repository | |
sudo chmod o+x /usr/sbin/add-apt-repository | |
sudo chown root:root /usr/sbin/add-apt-repository | |
sudo add-apt-repository ppa:webupd8team/sublime-text-2 |
OlderNewer