Skip to content

Instantly share code, notes, and snippets.

@binary10ve
binary10ve / docker-cleanup-resources.md
Created December 19, 2017 11:50 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// 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

@binary10ve
binary10ve / README.md
Created July 11, 2018 11:24 — forked from magnetikonline/README.md
NSSM - the Non-Sucking Service Manager cheatsheet.
module GoogleBackUp
def backup
puts("Back Up with Google")
super
end
end
class Phone{
backup(){
console.log("Applying default backup strategy")
}
}
function googleBackup(phone){
const _backup = phone.backup;
const getAppEnv = (function(){
class AppEnv{
constructor(platform, buildVersion){
this.platform = platform;
this.buildVersion = buildVersion;
this.cacheEnabled = false;
}
enableCache(){
@binary10ve
binary10ve / simple-pagination.js
Created March 7, 2022 18:31 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;