howler.js – Modern Web Audio Javascript Library

var sound = new Howl({ urls: [‘sounds.mp3’, ‘sounds.ogg’], sprite: { blast: [0, 2000], laser: [3000, 700], winner: [5000, 9000] } }); // shoot the laser! sound.play(‘laser’); howler.js defaults to Web Audio API and uses HTML5 Audio as the fallback. The library greatly simplifies the API and handles all of the tricky bits automatically howler.js → …

Sandboxed iframes

<iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms" src="https://platform.twitter.com/widgets/tweet_button.html" style="border: 0; width:130px; height:20px;"></iframe> The sandbox attribute of the iframe element allows us to tighten the restrictions on framed content. We can instruct the browser to load a specific frame’s content in a low-privilege environment, allowing only the subset of capabilities necessary to do whatever work needs doing. Play …

Removing OS X “Open With” Duplicates

Most of the time Finder will show you multiple entries for each application when right clicking a file and choosing Open With. Getting rid of Open With duplicates gives us an alias to remove those duplicates. Below is not only the alias, but a one-line command to add the alias to your ~/.bash_profile. Just copy …