Replaces all the images on a webpage with pictures of cats. Now in ES2015!
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
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(); | |
}); |
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 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 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 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 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 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
module.exports = function(){ | |
var self = {}; | |
//constructor stuff here | |
var private = 1; | |
self.public = 2; | |
var privateFunction = function(){ | |
console.log('this is a private 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
/** | |
@file fuzzylogic.c | |
@ingroup mc2liveAlg | |
hugh rawlinson - [email protected] | |
**/ | |
#include <stdio.h> | |
double fuzzyOR(double a, double b){ |
I hereby claim:
- I am hughrawlinson on github.
- I am hugh (https://keybase.io/hugh) on keybase.
- I have a public key whose fingerprint is 9DF4 5AF7 0122 2683 1AC2 5128 9C1A C9F8 BCFC 89C9
To claim this, I am signing this object:
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
int bpm; | |
// set the beats per minute here | |
60 => bpm; | |
// this signal flow approximates the timbre shown at: | |
// http://www.bsignetics.com/cases/ASD.ht65.gif | |
Noise n => HPF h => LPF l => ADSR e => dac; | |
int third; | |
int twothird; | |
60000/bpm/3 => third; |
OlderNewer