Skip to content

Instantly share code, notes, and snippets.

View revnelson's full-sized avatar

Michael Nelson revnelson

  • Scottsdale, AZ
  • 14:17 (UTC -07:00)
View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet
@cole007
cole007 / digitalocean.md
Last active November 22, 2023 16:54
Digital Ocean internal migration - moving files between droplets over SSH/SCP

If you need to move a lot of files between DO server you can move these through SCP over the internal private Digital Ocean network.

NB both droplets need to be within the same region

To do this you need:

  1. enable private network for each droplet (if not done at creation, note the droplet needs to be off for this to be enabled once live)
  2. ensure that eth1 is enabled for both droplets if not already - see https://www.digitalocean.com/community/tutorials/how-to-enable-digitalocean-private-networking-on-existing-droplets
  3. scp files from the source server to the destination server are sent like:
@0xAliRaza
0xAliRaza / nginx-server-block-generator.sh
Created September 24, 2020 21:34
A handy shell script to create Nginx server-block (virtual host).
#!/usr/bin/env bash
#
# Nginx - new server block
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
die() {
echo -e '\e[1;31m'$1'\e[m'
exit 1
}