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 parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
document.write('<style type="text/css">body{padding); margin:0}</style>'); | |
document.write('<iframe id="iwonder_hack" src="http://' + location.host + '/" width="100%" height="100%" style="border:0;padding:0;margin:0"></iframe>'); | |
setTimeout(function(){ | |
var frmdoc = document.getElementsByTagName('iframe')[0].contentWindow.document | |
,rotation = 0 | |
,links = frmdoc.getElementsByTagName('a') | |
,images = frmdoc.getElementsByTagName('img') | |
,props = ['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform'] | |
,transform = function(elem, trans) { | |
for (var i = 0; i < props.length; i++) { |
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
# install git | |
sudo apt-get install -y g++ curl libssl-dev apache2-utils | |
sudo apt-get install -y git-core | |
mkdir ~/src | |
cd ~/src | |
# download the Node source, compile and install it | |
git clone https://github.com/joyent/node.git | |
cd node |