Skip to content

Instantly share code, notes, and snippets.

Avatar

David Stark starkers

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am starkers on github.
  • I am starkers (https://keybase.io/starkers) on keybase.
  • I have a public key ASC_Ud4t4I5_0Y_89PVC3yX9Ax8Hqr5BhOHYJIVcorsC9Qo

To claim this, I am signing this object:

@starkers
starkers / wait-for
Created Aug 10, 2019
wait for http status code on an endpoint
View wait-for
#!/usr/bin/env python3
import logging
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
import argparse
import time
import sys
View gist:15be68bd2c6b6fec82960463be4e7100
#!/usr/bin/env python3
import click
import requests
from datetime import datetime, timedelta
import sys
# current_time = dt.datetime.utcnow().isoformat() + 'Z'
# expire_time = "2020-12-12T12:00:00Z"
@starkers
starkers / new-wireguard.sh
Created Feb 1, 2019
simple script for wireguard
View new-wireguard.sh
#!/usr/bin/env bash
## we know generating the client private here is bad.. but its quick n easy
FILE_MAIN=/etc/wireguard/wg0.conf
function list_existing_ips(){
grep ^AllowedIPs ${FILE_MAIN} | sed 's+\/32++g' | awk '{print $3}' | sort
}
@starkers
starkers / .vimrc
Last active May 11, 2019
minimal vimrc
View .vimrc
"""" TLDR
" I use this for when I need to do some quick hacking/testing on an instance or whatever
""""
" install with:
"""""
" curl -L https://gist.github.com/starkers/53c4cec182dd55bc42ba9b0572cfe162/raw/cdba66ede29df6be6e7cd3371ea9596d7e09d94a/.vimrc > ~/.vimrc
""""
set nocompatible
filetype off
@starkers
starkers / docker-compose.yml
Created Oct 24, 2018
production worthy gitlab, just snapshot the host daily..
View docker-compose.yml
---
version: '2'
services:
traefik:
image: traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/traefik.toml:/etc/traefik/traefik.toml:ro
View docker-compose.yml
---
version: '2'
services:
elasticsearch:
# slightly modified official image with data volume chmod fix
build:
context: ./elasticsearch_build
environment:
@starkers
starkers / starkers.zsh-theme
Last active Jul 22, 2018
starkers zsh theme
View starkers.zsh-theme
# heavily modified from sonicradish and other bits and bobs
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
#RTFM: https://www-s.acm.illinois.edu/workshops/zsh/prompt/escapes.html
setopt promptsubst
autoload -U add-zsh-hook
ROOT_ICON_COLOR=$FG[111]
View keybase.md

Keybase proof

I hereby claim:

  • I am starkers on github.
  • I am starkers (https://keybase.io/starkers) on keybase.
  • I have a public key ASDRpj6GhzbDf4L60R90iPKOTYpcvcdgeNTdvB-DuM5F4wo

To claim this, I am signing this object:

View arch-lvm-luks-notes.txt
## tips on coming to "pacman" or "yaourt" from "apt" world..
#
# pacman does official standard "arch" packages..
# yaourt will do that AND anything installed from the "Arch User Repo"
#
# run pacman with sudo (I alias "pacman" -> "sudo pacman" )
# run yaourt as yourself (it installs stuff locally to your profile and uses sudo if needed)
#
# apt-get update == pacman -Sy or yaourt -Sy
# apt-get search foo == pacman -Ss foo or yaourt -Ss foo