Skip to content

Instantly share code, notes, and snippets.


Ryan Schlesinger ryansch

View GitHub Profile
ryansch /
Last active Dec 18, 2020
linode stackscript for bootstrapping ubuntu with docker
set -euo pipefail
#<UDF name="name" label="Node name">
source <ssinclude StackScriptID="1">
#source ./
echo "Setting up ubuntu user's ssh key"
View starship.toml
# add_newline = false
# show_always = true
style_root = "red"
style_user = "purple"
# ssh_only = false
style = "yellow"
ryansch / init.vim
Last active May 1, 2019
neovim config
View init.vim
let g:ale_use_global_executables = 1
call plug#begin('~/.config/nvim/plugged')
Plug 'Shougo/denite.nvim'
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': { -> coc#util#install()}}
Plug 'w0rp/ale'
Plug 'maximbaz/lightline-ale'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" Plug 'autozimu/LanguageClient-neovim', {
ryansch / Dockerfile
Last active Oct 24, 2017
Docker snippet for rubygems
View Dockerfile
FROM outstand/ruby-base:2.4.2-alpine
RUN addgroup -S deploy && \
adduser -S -G deploy deploy && \
mv /usr/local/bin/rake /usr/local/bin/rake.back && \
apk add --no-cache bash build-base linux-headers tzdata curl curl-dev less && \
apk upgrade --no-cache
COPY . /srv/
View ssh_config
Host *
PasswordAuthentication no
ChallengeResponseAuthentication no
PubkeyAuthentication yes
docker images | tail -n +2 | grep -v "none" | awk '{printf("%s:%s\n", $1, $2)}' | while read IMAGE; do
echo $IMAGE
docker save ${IMAGE} | pigz --stdout > $filename
ryansch /
Last active Mar 21, 2017
Build terraform for macOS with docker

Run the following from the location of the terraform git clone:

docker run --rm -v $(pwd):/go/src/ -w /go/src/ -e XC_OS=darwin -e XC_ARCH=amd64 golang:latest bash -c "apt-get update && apt-get install -y zip && make bin"

Resulting binary is in pkg/darwin_amd64.

ryansch /
Last active Feb 5, 2019

Configure openvpn

You can run this entire first section with ryansch/openvpn:latest on a more powerful machine than the pi.


docker run -v $OVPN_DATA:/etc/openvpn --rm ryansch/openvpn:latest ovpn_genconfig -d -N -b -C AES-256-CBC -T TLS-DHE-RSA-WITH-AES-256-GCM-SHA384 -a SHA512 -n -p 'route' -u udp://<OPENVPN_HOST> -e 'topology subnet' -p 'dhcp-option DOMAIN <LAN_DOMAIN>' -E 'remote <OPENVPN_HOST> 443 tcp'

docker run -v $OVPN_DATA:/etc/openvpn --rm -it -e EASYRSA_KEY_SIZE=4096 ryansch/openvpn:latest ovpn_initpki

ryansch / create.log
Created Jan 19, 2017
docker-machine create debug log
View create.log
Docker Machine Version: 0.8.2, build e18a919
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
View boot.log
[ 0.000000] Linux version 4.9.4-rancher (root@1165eab7f7a9) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #1 SMP Sun Jan 15 22:26:11 UTC 2017
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.9.4-rancher rancher.autologin=tty1 rancher.autologin=ttyS0 console=tty0 console=ttyS0 printk.devkmsg=on initrd=/boot/initrd
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] Disabled fast string operations
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
You can’t perform that action at this time.