Skip to content

Instantly share code, notes, and snippets.

View nopdotcom's full-sized avatar

Jay Carlson nopdotcom

  • No Operation Partners
View GitHub Profile
#!/bin/sh
#
# If you're on an existing Ubuntu 16.04 machine, you can skip down to the DEPENDENCIES
# section. Otherwise you can use this file as a cloud-init on various providers.
#
# It would be much simpler if it only worked on one provider.
#
# This script takes a while to run. The file "ready" is created when finished.
# If you're logged in early, you can watch progress on most systems with the command
#
#!/bin/sh
#
# This script takes a while to run. The file "ready" is created when finished.
# If you're logged in early, you can watch progress with the command
#
# tail -f /var/log/cloud-init-output.log
#
set -e
set -x
if [ "$(id -u)" != 0 ]; then
@nopdotcom
nopdotcom / cloud-init.sh
Last active July 16, 2020 12:28
A cloud-init script for striesand-builder’s dependencies. Tested on EC2, DO, GCE, Vultr.
#!/bin/sh
#
# This script takes a while to run. The file "ready" is created when finished.
# If you're logged in early, you can watch progress with the command
#
# tail -f /var/log/cloud-init-output.log
#
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
if ! id ubuntu >/dev/null 2>&1; then
@nopdotcom
nopdotcom / gist:032cb37d8a80cb963759baca1ae26755
Created August 18, 2017 14:28
Streisand cloud-init for Lightsail and DigitalOcean
#!/bin/sh
#
# This script takes a while to run. The file "ready" is created when finished.
# If you're logged in early, you can watch progress with the command
#
# tail -f /var/log/cloud-init-output.log
#
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
if ! id ubuntu >/dev/null 2>&1; then
@nopdotcom
nopdotcom / .bashrc
Last active July 6, 2017 15:38
When I’m initializing routers, they generate a new SSH host key. I know the “remote” host identity has changed. This fragment gives you a command to clean up the old host key, while expressing your frustration.
# usage:
# $ ssh 192.168.1.1
# ssh: The host key has changed!!!1
# $ fuck you, ssh
# nop@192.168.1.1:~$
fuck () {
local lastcmd=$(history -p '!!:0')
if [ "$lastcmd" != "ssh" ]; then
echo "The last command doesn't look like ssh."

Keybase proof

I hereby claim:

  • I am nopdotcom on github.
  • I am nopdotcom (https://keybase.io/nopdotcom) on keybase.
  • I have a public key ASAqgSM1o-vSpf6QSLt8DnI27Gp_4JJZ5AsusfOKa_GdNgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am nopdotcom on github.
  • I am nopdotcom (https://keybase.io/nopdotcom) on keybase.
  • I have a public key ASAqgSM1o-vSpf6QSLt8DnI27Gp_4JJZ5AsusfOKa_GdNgo

To claim this, I am signing this object:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.