Skip to content

Instantly share code, notes, and snippets.

@nenadom
nenadom / renamer.js
Last active July 22, 2018 20:25
Renames a collection of %COUNTRY_NAME%.ext files to a matching set of %ISO_CODE%.ext files.
/**
* Renames a collection of %COUNTRY_NAME%.ext files to a matching set of
* %ISO_CODE%.ext files.
*
* Uses the https://github.com/datasets/country-codes dataset for names
* and ISO codes. Since it's CSV, I also used
* https://github.com/Keyang/node-csvtojson to convert to JSON.
*
* V 0.0.2.
*/
@nenadom
nenadom / toggle-compact-view.js
Last active October 15, 2018 09:07
Bookmarklet for compact view on GitHub Pull request file changes.
javascript:+function () {
/**
* Bookmarklet for compact view on GitHub Pull request file changes.
*/
'use strict';
let d, s, sh, id;
id = '__toggleCompactStyles__';
d = document, s = d.getElementById(id);
if (!s) {
s = d.createElement('style');
@nenadom
nenadom / nginx.conf
Created April 6, 2018 06:48 — forked from jonluca/nginx.conf
Nginx Conf
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 30000;
events {
worker_connections 65535;
multi_accept on;
use epoll;
}
@nenadom
nenadom / README.md
Last active November 27, 2023 09:28
Download Google Play Store badges
@nenadom
nenadom / query.js
Last active February 22, 2017 14:31
A convenience wrapper around querySelector/querySelectorAll, with a transform function to turn NodeLists into arrays.
/* jshint -W033, -W097 */
/* globals document, Element */
(function() {
"use strict";
function query(es, s) {
return _q(es, s, "querySelector")
}