Skip to content

Instantly share code, notes, and snippets.

View karstenmueller's full-sized avatar

Karsten Müller karstenmueller

View GitHub Profile

Keybase proof

I hereby claim:

  • I am karstenmueller on github.
  • I am kamueller (https://keybase.io/kamueller) on keybase.
  • I have a public key whose fingerprint is C7DD 55AA 51DB C880 8441 37AE 9947 4155 0430 802E

To claim this, I am signing this object:

@karstenmueller
karstenmueller / BoxStarter.ps1
Last active August 29, 2015 14:21
BoxStarter
# A simple BoxStarter script for use with http://boxstarter.org/WebLauncher
# Issue in CMD, Powershell or IE:
# START http://boxstarter.org/package/nr/url?<GIST RAW URL>
# Show more info for files in Explorer
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowFullPathInTitleBar
# Allow running PowerShell scripts
Update-ExecutionPolicy Unrestricted
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install -params '"/GitAndUnixToolsOnPath /NoAutoCrlf"'
@karstenmueller
karstenmueller / chefdk_bootstrap.ps1
Last active March 14, 2016 12:17
Run chefdk_bootstrap with elevated permissions
$url = "https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1"
$out = "$env:USERPROFILE\Documents\bootstrap.ps1"
Invoke-WebRequest -Uri $url -OutFile $out
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$out`"" -Verb RunAs
exit
}
@karstenmueller
karstenmueller / docx2md.md
Created April 29, 2016 11:11 — forked from jesperronn/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@karstenmueller
karstenmueller / aws_az_list.md
Created December 1, 2016 18:26
List of AWS availability zones for each AWS region

AWS Regions

Region Code Region Name Availability Zones
us-east-1* N. Virginia us-east-1a us-east-1b us-east-1c us-east-1d us-east-1e
us-east-2 Ohio us-east-2a us-east-2b us-east-2c
us-west-1* N. California us-west-1a us-west-1b us-west-1c
us-west-2 Oregon us-west-2a us-west-2b us-west-2c
eu-west-1 Ireland eu-west-1a eu-west-1b eu-west-1c
eu-central-1 Frankfurt eu-central-1a eu-central-1b
@karstenmueller
karstenmueller / basic.rb
Last active May 20, 2017 05:40
Basic Workstation Configuration
chocolatey_package 'git' do
package_name 'git'
options '-params /GitAndUnixToolsOnPath'
end
packages = %w[conemu visualstudiocode 7zip winmerge vagrant autohotkey]
packages.each do |pkg|
chocolatey_package pkg
end
@karstenmueller
karstenmueller / .envrc
Last active December 6, 2019 09:16
gcp-example
export CLOUDSDK_CORE_PROJECT="k8s-example"
export CLOUDSDK_COMPUTE_ZONE="europe-west3-c"
#!/usr/bin/env bash
set -o nounset -o errexit -o pipefail
SCRIPT_DIR=${SCRIPT_DIR:="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"}
TF_CONTEXT="${TF_CONTEXT:-}" # name of the game
TF_IMAGE_VERSION="${TF_IMAGE_VERSION:-$(cat .terraform-version)}"
usage="usage: $(basename "$0") <plan|apply|destroy|validate|fmt> <module>"
@karstenmueller
karstenmueller / agnoster.zsh-theme
Last active November 26, 2020 12:19
agnoster.zsh-theme
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
CURRENT_BG='NONE'
case ${SOLARIZED_THEME:-dark} in
light) CURRENT_FG='white';;
*) CURRENT_FG='black';;
esac