Skip to content

Instantly share code, notes, and snippets.

View dreamcat4's full-sized avatar
😋

Dreamcat4 dreamcat4

😋
View GitHub Profile
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
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

@dreamcat4
dreamcat4 / odyssey-2016.md
Last active August 29, 2015 14:23
Odyssey Case Reference Design: drivebayless-ATX
@voxxit
voxxit / USING-VAULT.md
Last active July 7, 2022 03:02
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@chernjie
chernjie / logrotate.d-docker
Created April 17, 2015 17:31
Logrotate docker logs, copy this file to /etc/logrotate.d/docker
/var/lib/docker/containers/*/*-json.log {
dateext
daily
rotate 365
compress
delaycompress
missingok
}
From 966471712184cfb3b067f2ae8dad9d8e2a896cae Mon Sep 17 00:00:00 2001
From: Bearice Ren <bearice@icybear.net>
Date: Tue, 20 Sep 2016 11:52:08 +0800
Subject: [PATCH] add filter-aaaa option
---
src/dnsmasq.h | 3 ++-
src/option.c | 3 +++
src/rfc1035.c | 9 +++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
@dreamcat4
dreamcat4 / install_rvm.rb
Created August 21, 2010 19:33
Install RVM to /usr/local - as admin group
#!/usr/bin/env ruby
#
# One-liner
# curl -fsS https://gist.github.com/raw/542746/install_rvm.rb | ruby -e '$script=STDIN.read;eval $script'
#
# This script installs to /usr/local only. It assumes theres an
# admin group on your system - either "wheel", "admin", or "staff"
#
# Sudo is used a few times during the initial install. But anyone
# in admin group can manage rvm (regardless of sudo privelidges)
#
# Tasks to keep your repository in sync with your Chef Server
#
# Author:: Matthew Kent (<mkent@magoazul.com>)
# Copyright:: Copyright (c) 2010 Matthew Kent
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@hal0thane
hal0thane / gist:157447
Created July 28, 2009 15:24
FileVault and Launch Services
I've been fighting the same problem and have to say the hint provided here about resetting the launch services, and letting `launchd` do this at login (via Lingon) is invaluable. Thanks a lot for that, it makes FileVault far more usable!
After using this for a while, I have however discovered a side effect of resetting the launch services that is rather annoying--but I have also found a solution for it.
The _problem_ is that after resetting the launch services, calling a protocol handler registered by a user installed application is considered a **first time call** again, meaning it needs to be confirmed by the user (unless the app has been started directly before the call). Examples I stumbled upon are:
* bookmarking through the Pukka bookmarklet
* opening an Evernote note from a Spotlight search
* calling a `man` page in Safari through Bwana.