Skip to content

Instantly share code, notes, and snippets.

View joshix's full-sized avatar

Josh Wood joshix

View GitHub Profile
apiVersion: etcd.database.coreos.com/v1beta2
kind: EtcdCluster
metadata:
name: example
spec:
size: 3
version: 3.2.13
#!/bin/rc
clonefile=/net/tcp/clone
if(! ~ $#* 2) {
echo Usage: telnet ip port >[1=2]
exit usage
}
<[4] $clonefile {
@joshix
joshix / swap.service
Last active November 28, 2017 02:27
Adding swap on CoreOS
[Service]
Type=oneshot
Environment="SWAP_PATH=/var/vm" "SWAP_FILE=swapfile1"
ExecStartPre=-/usr/bin/rm -rf ${SWAP_PATH}
ExecStartPre=/usr/bin/mkdir -p ${SWAP_PATH}
ExecStartPre=/usr/bin/touch ${SWAP_PATH}/${SWAP_FILE}
ExecStartPre=/bin/bash -c "fallocate -l 1024m ${SWAP_PATH}/${SWAP_FILE}"
ExecStartPre=/usr/bin/chmod 600 ${SWAP_PATH}/${SWAP_FILE}
ExecStartPre=/usr/sbin/mkswap ${SWAP_PATH}/${SWAP_FILE}
ExecStartPre=/usr/sbin/sysctl vm.swappiness=10
@joshix
joshix / markdown.6.txt
Created July 6, 2016 20:41
Plan9 /sys/man/6/markdown
MARKDOWN(6) MARKDOWN(6)
NAME
#!/bin/cat
# This is a self-replicating unix shell program. The kernel
# hands this file to the interpreter named in the first
# line. cat(1) does its thing which is printing on standard
# output.
@joshix
joshix / rktinvocations.md
Last active February 4, 2016 03:16
rkt invocations and demonstrations

Rkt invocations

Unprivileged rkt fetch

rkt can discovery, retrieve, verify, and store images without root privileges.

core@core-02 ~ $ rkt fetch quay.io/coreos/alpine-sh
rkt: searching for app image quay.io/coreos/alpine-sh
rkt: remote fetching from URL "https://quay.io/c1/aci/quay.io/coreos/alpine-sh/latest/aci/linux/amd64/"