Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
Based on this gist.
TODO
// see: https://github.com/chadoe/docker-cleanup-volumes
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
Based on this gist.
TODO
// see: https://github.com/chadoe/docker-cleanup-volumes
pacakge msgtest | |
import ( | |
"io" | |
"mime" | |
"mime/multipart" | |
"net/mail" | |
"net/textproto" | |
"os" | |
"path/filepath" |
// Runable: https://play.golang.org/p/-bkg2k6ymCR | |
// | |
package main | |
import ( | |
"fmt" | |
"reflect" | |
"time" | |
) |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
(A Russian translation of this article can be found here, contributed by Timur Demin.)
git log --reverse --max-count=1
master
: git rev-list --no-merges master --count
master
per author: git shortlog -s -n --no-merges master
master
: git rev-list --merges --first-parent master --count
If you want to see the commits in question, you can replace --count
with something like --pretty=oneline
.
package main | |
import ( | |
"testing" | |
"github.com/stretchr/testify/require" | |
) | |
// Chunks re-slices a slice into chunks not longer than the specified max length. | |
// For example, a slice with seven elements being sliced into chunks of two will |
macro_rules! once { | |
($exp:expr) => { | |
once!((), $exp) | |
}; | |
($type:ty, $exp:expr) => {{ | |
static ONCE: once_cell::sync::OnceCell<$type> = once_cell::sync::OnceCell::new(); | |
ONCE.get_or_init(|| $exp) | |
}}; | |
} |
/// Encloses the string written by `enclosed` in the opening an closing | |
/// characters provided. | |
fn enclose<F>(s: &mut String, open: char, close: char, enclosed: F) | |
where | |
F: FnOnce(&mut String), | |
{ | |
s.push(open); | |
enclosed(s); |