Improved .visually-hidden
Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.
| var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' + | |
| 'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' + | |
| 'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' + | |
| ': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));'; | |
| try { | |
| eval(str); | |
| } catch(e) { | |
| alert('Your browser does not support ES6!') | |
| } |
| // more minimal version of https://github.com/olahol/scrollparent.js/blob/master/scrollparent.js | |
| const regex = /(auto|scroll)/; | |
| const style = (node, prop) => | |
| getComputedStyle(node, null).getPropertyValue(prop); | |
| const scroll = (node) => | |
| regex.test( | |
| style(node, "overflow") + | |
| style(node, "overflow-y") + |
| new Date(seconds * 1000).toISOString().substr(11, 8) |
Copied from the official Docker-for-mac documentation (thanks Brett for the updated doc pointer):
Docker Desktop for Mac comes with scripts to enable completion for the docker, docker-machine, and docker-compose commands. The completion scripts may be found inside Docker.app, in the Contents/Resources/etc/ directory and can be installed both in Bash and Zsh.
Bash has built-in support for completion To activate completion for Docker commands, these files need to be copied or symlinked to your bash_completion.d/ directory. For example, if you installed bash via Homebrew:
| //https://developer.mozilla.org/en-US/docs/Web/Events/resize | |
| ; | |
| (function() { | |
| var throttle = function(type, name, obj_) { | |
| var obj = obj_ || window; | |
| var running = false; | |
| var func = function() { | |
| if (running) { | |
| return; | |
| } |
| # The command finds the most recent tag that is reachable from a commit. | |
| # If the tag points to the commit, then only the tag is shown. | |
| # Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
| # and the abbreviated object name of the most recent commit. | |
| git describe | |
| # With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
| git describe --abbrev=0 | |
| # other examples |
Why would you want to do this? Because you often don't need more. It's nice to not have to think about your "router" as this big special thing.
Instead, with this approch, your app's current pathname is just another piece of state, just like anything else.
This also means that when doing server-side rendering of a redux app, you can just do:
var app = require('your/redux/app')
var React = require('react')| // array utils | |
| // ================================================================================================= | |
| const combine = (...arrays) => [].concat(...arrays); | |
| const compact = arr => arr.filter(Boolean); | |
| const contains = (() => Array.prototype.includes | |
| ? (arr, value) => arr.includes(value) | |
| : (arr, value) => arr.some(el => el === value) |
| Unicode table - List of most common Unicode characters * | |
| * This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable. | |
| Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol. | |
| What is Unicode? | |
| Unicode is a standard created to define letters of all languages and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode. | |
| How to identify the Unicode number for a character? | |
| Type or paste a character: |