Skip to content

Instantly share code, notes, and snippets.

View digimeerkat's full-sized avatar

digimeerkat digimeerkat

View GitHub Profile
@digimeerkat
digimeerkat / create-docker-droplet.sh
Last active April 14, 2024 17:24 — forked from christianberg/create-docker-droplet.sh
Shell script to create a Digital Ocean Droplet and install docker
#!/bin/bash
set -e
SECRETFILE=~/.digitalocean
if [[ -z $DIGOCEAN_ID ]] || [[ -z $DIGOCEAN_KEY ]]; then
if [ -e $SECRETFILE ]; then
. $SECRETFILE
fi
fi
@digimeerkat
digimeerkat / gist:b692778605088b49443c
Last active August 31, 2015 11:56 — forked from jpospychala/gist:69d783f2eeeea1a9450e
create DigitalOcean droplet from shell with curl and rcli
# this script expects $DOTOKEN variable with your digital ocean token
# this script gets or creates smallest DO droplet and remotely executes script on it
# afterwards, droplet is destroyed
DROPLETNAME=example.com
DOHOME="https://api.digitalocean.com/v2"
cat <<EOF > .curlargs
-s
-H "Authorization: Bearer $DOTOKEN"