sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| /** | |
| * Provides the overlapping status between two elements | |
| * based on the passed in Element objects | |
| * | |
| * @param {Element, Element} Element object of DOM | |
| * @return {Boolean} overlap status or null if native object not received | |
| */ | |
| const isOverlapping = (e1, e2) => { | |
| if (e1.length && e1.length > 1) { | |
| e1 = e1[0]; |
| <?php | |
| # Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
| # http://creativecommons.org/publicdomain/zero/1.0/ | |
| function ampify($html='') { | |
| # Replace img, audio, and video elements with amp custom elements | |
| $html = str_ireplace( | |
| ['<img','<video','/video>','<audio','/audio>'], |
| -- AppleScript to create a new file in Finder | |
| -- | |
| -- Use it in Automator, with the following configuration: | |
| -- - Service receives: no input | |
| -- - In: Finder.app | |
| -- | |
| -- References: | |
| -- - http://apple.stackexchange.com/a/129702 | |
| -- - http://stackoverflow.com/a/6125252/2530295 | |
| -- - http://www.russellbeattie.com/blog/fun-with-the-os-x-finder-and-applescript |
| /** @jsx React.DOM */ | |
| "use strict"; | |
| var util = { | |
| // findPos() by quirksmode.org | |
| // Finds the absolute position of an element on a page | |
| findPos: function (obj) { | |
| var curleft = 0, | |
| curtop = 0; |
| # Author = Nikhil Venkat Sonti | |
| # email = nikhilsv92@gmail.com | |
| # github ID = shadowfax92 | |
| import sys | |
| from xml.dom.minidom import _get_StringIO | |
| from lxml import html | |
| import requests | |
| import os | |
| import re | |
| import time |
| function scrollTo(Y, duration, easingFunction, callback) { | |
| var start = Date.now(), | |
| elem = document.documentElement.scrollTop?document.documentElement:document.body, | |
| from = elem.scrollTop; | |
| if(from === Y) { | |
| callback(); | |
| return; /* Prevent scrolling to the Y point if already there */ | |
| } |