Skip to content

Instantly share code, notes, and snippets.

@julkwel
julkwel / html5-canvas-and-javascript-fireworks-tutorial.markdown
Created January 1, 2019 06:49
HTML5 canvas and javascript fireworks tutorial

HTML5 canvas and javascript fireworks tutorial

Learn to make a fireworks display with HTML5 Canvas and JavaScript. In this demo, the pixel sized rockets launch from the bottom of the screen automatically, and by the click of your mouse. You can also click and drag to launch multiple fireworks.

The tutorial covers keeping track of and looping over objects contained in arrays, tracking mouse clicks and coordinates, animating fireworks to specific target coordinates, and making beautiful particle explosions through the use of randomly generated values.

Feel free to play with the config variables in the JS code to have fun with the experiment.

This was made by: https://twitter.com/jackrugile

@cleverca22
cleverca22 / 32bit-simple-test.nix
Last active September 8, 2019 12:43
patchelf util
with import <nixpkgs> { system = "i686-linux"; };
runCommandCC "filename" { buildInputs = [ gcc ]; } ''
cat <<EOF > $out
#!${stdenv.shell}
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${lib.makeLibraryPath [ zlib ]} \$1
EOF
chmod +x $out
''