Skip to content

Instantly share code, notes, and snippets.

@ShooShoSha
ShooShoSha / random-server-name.sh
Created June 1, 2020 19:20
Shell script gets random mnemonic word
#!/bin/sh
# Gets a random mnemonic word from a gist.
# See https://gist.github.com/bwbaugh/bf78612ef58ad0402a05
URL='https://gist.githubusercontent.com/bwbaugh/bf78612ef58ad0402a05/raw/0f8ea7a054ff5c9c4209414beadf7a3acdd03373/server-name-wordlist-mnemonic.txt'
NAME=`curl --silent --show-error "$URL" | tail --lines +4 | shuf | head --lines 1`
echo "$NAME"
return 0
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/>
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt>
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
acrobat
africa
alaska
albert
albino
album
alcohol
@ShooShoSha
ShooShoSha / update.sh
Created December 10, 2019 18:23
Simple script to update
sudo -s -- <<APT
apt-get update
apt-get upgrade -y
apt-get autoremove -y
apt-get autoclean -y
APT
@ShooShoSha
ShooShoSha / HelloWorld.java
Created January 19, 2018 22:28
Hello World in Java (for testing proper JDK install)!
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}