$ pip install awscli
...
$ aws configure # and setup the default profile
...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure the jq provider | |
terraform { | |
required_providers { | |
jq = { | |
source = "massdriver-cloud/jq" | |
version = "0.2.0" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import logging | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
from botocore.exceptions import ClientError | |
# Configure logging | |
logging.getLogger().setLevel(logging.INFO) | |
logger = logging.getLogger() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Add a patch release to a bunch of github repos | |
set -eu -o pipefail | |
git() { | |
( | |
set -xv | |
command git "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! powershell | |
$HttpListener = New-Object System.Net.HttpListener | |
$HttpListener.Prefixes.Add("http://+:80/") | |
$HttpListener.Prefixes.Add("http://+:18093/") | |
$HttpListener.Prefixes.Add("http://+:18095/") | |
# $HttpListener.Prefixes.Add("https://+:443/") | |
$HttpListener.Start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu -o pipefail | |
content="foo and bar and baz" | |
content="$(base64 <<<"$content")" | |
sha=$(git ls-files -s foo | awk '{print $2}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install cleanup utils | |
apt-get install -y deborphan | |
# Remove all desktop/gui/hci packages/libraries | |
apt-get purge -yyq --auto-remove \ | |
task-desktop x11-common fdutils \ | |
'*ubuntu-desktop*' \ | |
'*X11*' '*wayland*' '*xdmcp*' '*gtk*' '*gnome*' 'x11-*' '*font*' \ | |
'*orca*' '*bluez*' '*bluetooth*' '*audio*' '*desktop*' '*laptop*' \ | |
'*acpi*' '*spell*' '*avahi*' '*-faq*' '*cups*' '*sane*' '*icon*' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# neovim build dependencies | |
sudo apt-get build-dep neovim -t unstable | |
# Build tools | |
sudo apt install build-essential libtool libtool-bin devscripts | |
# git source | |
git clone https://github.com/neovim/neovim.git | |
cd neovim | |
# Checkout latest tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PowerShell | |
Set-StrictMode -Version 2.0 | |
Set-PSDebug -Trace 0 | |
$ErrorActionPreference = 'STOP' | |
function Register-LogWriter { | |
<# | |
.SYNOPSIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /etc/cron.hourly/0refresh-ntp | |
# Workaround for guest clock going out of skew regularly | |
# Essentially synchronizes systemd-timesyncd with NTP | |
# via timedatectl but using a reference of the datetime | |
# returned by http://worldtimeapi.org/api/ip | |
set -eu -o pipefail |
NewerOlder