Skip to content

Instantly share code, notes, and snippets.

@ebraminio
Last active May 14, 2017 11:01
Show Gist options
  • Save ebraminio/a2e4338ce29d71156ea1703f5aaec4b6 to your computer and use it in GitHub Desktop.
Save ebraminio/a2e4338ce29d71156ea1703f5aaec4b6 to your computer and use it in GitHub Desktop.
nginx mime types
// http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
var result = {};
$('pre').textContent.split('\n').filter(x => /;/.exec(x)).map(x => x.trim().replace(';', '').split(/ +/)).forEach(x => x.slice(1).forEach(y => result[y] = x[0]));
copy(JSON.stringify(result));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment