Skip to content

Instantly share code, notes, and snippets.

@finchd
finchd / choco.ps1
Last active September 10, 2024 03:48
The apps I install with chocolatey, etc
# use jessfraz boxstarter config +/- the below
## multipass VMs:
## multipass list
## multipass find (not a search, just what images are published
### multipass launch -c 4 -d 30G -m 16G -n cloud-init-test-2004-2021-07-09 --cloud-init .\multipass-primary-cloud-init.yml 20.04
## Powershell tips:
# powershell version
@finchd
finchd / script-template.sh
Created December 22, 2020 03:52 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@finchd
finchd / myscript.sh
Created December 6, 2019 08:19 — forked from jesusaurus/myscript.sh
Redirect a bash script's output and error to syslog
#!/usr/bin/env bash
# The pattern `exec > $X 2>&1` does two things: the last bit redirects standard
# error to go to standard output, and the first bit sends standard output to the
# file $X. Here our $X is the process substitution `>( $process )` which takes
# the standard input of $process and presents it as a file handle. Putting
# these two together, we have both our standard out and our standard error
# going to the standard input of $process. Our $process here first runs tee,
# which sends its standard input to both standard out and to the file listed.
# We then pipe our standard out into the logger command, which sends it to syslog.
@finchd
finchd / boxstarter.ps1
Created December 6, 2019 07:52 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@finchd
finchd / .vimrc
Last active March 3, 2023 20:29
.vimrc
set nocompatible
" because we don't need vi compatibility, and want our backspace key to work
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
" because we want the defaults, until we don't
" install vim-plug first https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
@finchd
finchd / setup-local-k8s-tools.sh
Last active June 20, 2019 18:10
K8s Local CLI Setup
#!/usr/bin/env bash
function curl-options(){
curl -sL "$@"
}
## pre-configure
opsys=$(uname -s | tr '[:upper:]' '[:lower:]')
## Install
@finchd
finchd / seagl2018-structured-ansible.md
Created November 13, 2018 06:48
SeaGL 2018 - Structured Ansible Playbooks
@finchd
finchd / seagl2018-tcp-perf.md
Last active November 13, 2018 06:46
SeaGl 2018 - The impact of lossy networks on TCP performance

The impact of lossy networks on TCP performance

Jeff Silverman (jeffsilverm at- gmail.com)

questions to answer

How well does TCP cope with loss?

@finchd
finchd / seagl2018-monitoring-unknown.md
Last active November 13, 2018 06:45
SeaGl 2018 - Monitoring and Alerting: Knowing the Unknown

Monitoring & Alerting

Amanda Sopkin (amsopkin at- gmail.com)

#1 Alert on Symptoms, not causes

  • causes may not actually effect users
  • e.g. disk full is a cause of the app being down, not a symptom; you do need to fix it but because of the user impact, not because disks inherently need to be empty
@finchd
finchd / seagl2018-github-is-not-resume.md
Created November 11, 2018 07:39
SeaGl 2018 - No, Your GitHub Is Not Your Resume