Replaces all the images on a webpage with pictures of cats. Now in ES2015!
This file contains hidden or 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
shh much dogcodez, many errorz, wow | |
very dog is 'shit zoo' | |
such woofDog | |
plz console.loge with dog | |
wow | |
while(dog == 'shit zoo'){ | |
rly 0.9 <= Math.random() |
This file contains hidden or 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 makepw(){ | |
var text = ""; | |
var len = random(1,15) | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for( var i=0; i < len; i++ ) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
} |
This file contains hidden or 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 content = document.body.innerHTML;; | |
var comments = content.match(/<!--.*?-->/g); | |
if(comments!=null|comments!=undefined){ | |
for (var x = 0; x < comments.length;x++){ | |
console.log(comments[x]); | |
} | |
} | |
else{ | |
console.log('No Comments'); | |
} |
This file contains hidden or 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 vineVideoElement = document.getElementById('vineVideo'); | |
var instVideoElement = document.getElementById('instVideo'); | |
var instGain; | |
var vineGain; | |
window.AudioContext = window.AudioContext||window.webkitAudioContext; | |
var context = new AudioContext(); | |
function initCrossfade(){ | |
vineVideoElement.play(); | |
instVideoElement.play(); |
This file contains hidden or 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
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.write('<html><body><h1>Welcome to W1-TempServ</h1>\n'); | |
var temp = ''; | |
fs.readFile('/home/simon/temp', 'utf8', function (err, data) { | |
if (err) throw err; | |
console.log(data); | |
res.write("<p>"+data+"</p></body></html>"); | |
res.end(); | |
}); |
NewerOlder