Skip to content

Instantly share code, notes, and snippets.

@moimikey
Last active October 26, 2023 15:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moimikey/1e9498d58e316bc28d02a0a2a5313fc8 to your computer and use it in GitHub Desktop.
Save moimikey/1e9498d58e316bc28d02a0a2a5313fc8 to your computer and use it in GitHub Desktop.
rick-roll
var music, musicParse;
musicParse = function(f) {
return eval("for(var t=0,S='RIFF_oO_WAVEfmt " + atob('EAAAAAEAAQBAHwAAQB8AAAEACAA') + "data';++t<3e5;)S+=String.fromCharCode(" + f + ")");
};
music = function() {
var audio, formula;
formula = '(t<<3)*[8/9,1,9/8,6/5,4/3,3/2,0][[0xd2d2c8,0xce4088,0xca32c8,0x8e4009][t>>14&3]>>(0x3dbe4688>>((t>>10&15)>9?18:t>>10&15)*3&7)*3&7]&255';
audio = new Audio("data:audio/wav;base64," + (btoa(musicParse(formula))));
return audio.play();
};
music();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment