For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
#!/usr/bin/env bash | |
# This script prints out all of your Redis keys and their size in a human readable format | |
# Copyright 2013 Brent O'Connor | |
# License: http://www.apache.org/licenses/LICENSE-2.0 | |
human_size() { | |
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
} |
public interface GuavaCacheMXBean { | |
public long getRequestCount(); | |
public long getHitCount(); | |
public double getHitRate(); | |
public long getMissCount(); |
#!/usr/bin/env groovy | |
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.servlet.* | |
import groovy.servlet.* | |
@Grab(group='org.eclipse.jetty.aggregate', module='jetty-all', version='7.6.15.v20140411') | |
def startJetty() { | |
def server = new Server(8080) |
# to simplify life, install xclip and append the following lines to your .bashrc | |
alias "c=xclip" # copy to X clipboard (register *) | |
alias "cs=xclip -selection clipboard" # copy to system wide clipboard (register +) | |
alias "v=xclip -o" # output copied content (paste) | |
alias "vs=xclip -o -selection clipboard" # paste from system wide clipboard (equivalent to `v -selection clipboard`) | |
# examples: | |
# copy to X: | |
# go to the same directory in terminal 2 as in terminal 1 | |
# Terminal 1: |
package com.cpm; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
import java.util.Locale; | |
import java.util.PropertyResourceBundle; |
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
#copies the piped input onto the clipboard | |
alias copy="xclip -selection c" | |
#pastes the clipboards contents into the terminal | |
alias paste="xclip -selection clipboard -o" |