Skip to content

Instantly share code, notes, and snippets.

View starkers's full-sized avatar

David Stark starkers

  • London, UK
  • 21:59 (UTC +01:00)
View GitHub Profile

DIY hetzner multi-host

This guide is a general howto based against a server I recently setup.

The good things:

  1. you get a cheap server with several IPs
  2. You can run virtualised hosts with their own IPs
  3. You can also run containers with public IPs. (in this case I'm using LXD/LXC, docker is an option or even experiment with others inside your KVM)
  4. ZFS integration for your LXC snapshoting and even KVM hosts, I can't stress how awesome ZFS is at this
  5. LTS 16.04 has security patches till at least the year 2021
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks
#
# List of valid properties:
#
# align
# color
# background
# Normal shortcuts
<ctrl-/> comment/uncomment a line or visual block
<ctrl-f> open "files" in the same dir as current file
<ctrl-p> "CtrlP" file browser (fuzzy finding)
<ctrl-n> "new" buffer
<ctrl-o> "open" previous files from MRU (most recently used)
<leader>? view vim cheatsheet / "help"
<leader>e show/disable "expand tab" toggle
<leader>f toggle the "file browser" pane, ? for help or :help NERDtree
<leader>g toggle "git" hints
" "========================================================================"
" "========== vim-plug for plugin management"
" "========================================================================"
call plug#begin('~/.local/share/nvim/plugged')
" "========================================================================"
" "========== completions and linting"
function! BuildYCM(info)
" function to automatically run install.py for you
# i3 config
#AKA Super/Windows/Apple
set $mod Mod4
set $terminal terminator
#How to alise colors EG:
# set_from_resource $darkred color1 #000000
# set_from_resource $red color9 #000000
" "========================================================================"
" "========== vim-plug for plugin management"
" "========================================================================"
call plug#begin('~/.local/share/nvim/plugged')
" "========================================================================"
" "========== completions and linting"
function! BuildYCM(info)
" function to automatically run install.py for you
# Normal shortcuts
<ctrl-/> comment/uncomment a line or visual block
<ctrl-f> open "files" in the same dir as current file
<ctrl-p> "CtrlP" file browser (fuzzy finding)
<ctrl-n> "new" buffer
<ctrl-o> "open" previous files from MRU (most recently used)
<leader>? view vim cheatsheet / "help"
<leader>e show/disable "expand tab" toggle
<leader>f toggle the "file browser" pane, ? for help or :help NERDtree
<leader>g toggle "git" hints
" "========================================================================"
" "========== vim-plug for plugin management"
" "========================================================================"
call plug#begin('~/.local/share/nvim/plugged')
" "========================================================================"
" "========== completions and linting"
function! BuildYCM(info)
" function to automatically run install.py for you
@starkers
starkers / docker-enter.sh
Last active July 4, 2017 12:44
docker-enter gcp
#!/usr/bin/env bash
if [ -e $(dirname "$0")/nsenter ]; then
# with boot2docker, nsenter is not in the PATH but it is in the same folder
NSENTER=$(dirname "$0")/nsenter
else
NSENTER=nsenter
fi
@starkers
starkers / v
Last active October 6, 2016 14:24
v for vagrant
#!/usr/bin/env bash
# v for vagrant david@starkers.org
#get a list of vagrant VMs..
#...I know its ugly
loremipsums="$(vagrant global-status | grep -A999 "^----" | grep -v "^----" | grep -B99 "The above shows information about all known Vagrant environments" | grep -v "^ $" | grep -v "The above shows information about all known Vagrant environments" | awk '{print $5,$4}')"
oldIFS=$IFS