View utils.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Smart transform passed value to an array: | |
* If it's any primitive other than Array, wrap with an array | |
* If it's any "array like" itterator, transform to an array | |
* Useful for transforming Nodelists etc. to use with array functions | |
* @example | |
* tests: https://codepen.io/tombigel/pen/BajWqQY | |
* @param {*} value | |
* @returns {*[]} | |
*/ |
View PromiseQueue.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @class PromiseQueue Manage a queue of promises | |
*/ | |
function PromiseQueue() { | |
const queue = {}; | |
let idCount = 0; | |
return { | |
/** | |
* Add a promise to the queue and remove it once resolved | |
* todo: handle reject() |
View README.md
How to Change Open Files Limit on OS X and macOS
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/
Mac OS X
To check the current limits on your Mac OS X system, run:
View border-radius-input.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$br: 1px 2px 3px; | |
@function blowup-border-radius($br) { | |
$long-br: $br; | |
@if length($br) == 1 { | |
$long-br: ($br $br $br $br); |
View pre-commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# A hook script to verify that no images with capital letters are committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# Go through all the changed files (except for deleted and unmerged) | |
# | |
# Check for lines containing "debugger" "console." or "alert(" |