Skip to content

Instantly share code, notes, and snippets.

View SimonWoidig's full-sized avatar

Šimon Woidig SimonWoidig

View GitHub Profile
@iambryancs
iambryancs / share-docker-build-arg-multi-stage.md
Created July 20, 2023 13:21
Sharing Docker build ARG in multi-stage builds

Sharing Docker build ARG in multi-stage builds

To share Docker build ARGs in a multi-stage build, simply declare it globally then mention it in subsequent builds to renew.

ARG IMG=alpine:3.14.2
FROM gcr.io/kaniko-project/executor:v1.9.0-debug AS kaniko

ARG IMG
FROM ${IMG}
RUN apk --update add \
@MatthewJDavis
MatthewJDavis / SSLPoke.java
Created January 10, 2019 00:15
Java SSL poke from atlassian
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
@efrecon
efrecon / run.tpl
Last active June 12, 2025 07:44
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@timcharper
timcharper / README.md
Last active January 15, 2025 12:45
Macvlan using systemd

Before

yum install -y systemd-networkd
modprobe macvlan # make sure this returns no errors

Put config files in place

eth0.network and mac0.{netdev,network} go in /etc/systemd/network/

@tdd
tdd / gitconfig.ini
Last active April 16, 2025 03:24
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = [email protected]
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases