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
@mixin mt($px) { margin-top: $px; } | |
@mixin mb($px) { margin-bottom: $px; } | |
@mixin ml($px) { margin-left: $px; } | |
@mixin mr($px) { margin-right: $px; } | |
@mixin ma($px) { margin: $px; } | |
@mixin mx($px) { @include ml($px); @include mr($px); } | |
@mixin my($px) { @include mt($px); @include mb($px); } | |
@mixin pt($px) { padding-top: $px; } | |
@mixin pb($px) { padding-bottom: $px; } | |
@mixin pl($px) { padding-left: $px; } |
#!/bin/bash | |
# Source: http://vstone.eu/reducing-vagrant-box-size/ | |
# Modified by: Jason Yang [jason.yang at mercatustechnologies.com] | |
function pause() { | |
read -p "$*" | |
} | |
cat - << EOWARNING |
const dislike = (el) => { | |
return new Promise((res, rej) => { | |
el.click(); | |
setTimeout(() => { | |
document.querySelector('a.itemAnchor').click(); | |
setTimeout(() => { | |
res(); | |
}, 1000); | |
}, 2000); | |
}); |
// browser detect | |
var BrowserDetect = { | |
init: function() { | |
this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; | |
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; | |
this.OS = this.searchString(this.dataOS) || "an unknown OS"; | |
}, | |
searchString: function(data) { | |
for (var i = 0; i < data.length; i++) { | |
var dataString = data[i].string; |
using System; | |
class MainClass { | |
public static void Main (string[] args) { | |
// Credits https://www.codeproject.com/Articles/37215/Permutations-in-C-Using-Recursion | |
Console.Write("Input String>"); | |
string inputLine = Console.ReadLine(); |
export const leftPad = (str, howMany, char = '0') => { | |
if(str.length >= howMany) return str; | |
const space = Array(howMany).fill(char); | |
const aStr = str.split(''); | |
const merge = space.concat(aStr); | |
merge.splice(0, aStr.length); | |
return merge.join(''); | |
} |
git clone --recursive --origin wp-boiler --depth 1 [email protected]:pricelessmisc/wp-boiler.git
Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask
If you already have Java
installed on your system, skip steps Install Cask and Install Java
If you already have Java
and Homebrew
installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
function readdirRecursSync(dir, filelist) { | |
filelist = filelist || []; | |
var files = fs.readdirSync(dir); | |
files.forEach(function (file) { | |
file = path.join(dir, file); | |
if (fs.statSync(file).isDirectory()) { | |
filelist = readdirRecursSync(file, filelist); |