Skip to content

Instantly share code, notes, and snippets.

View misterorion's full-sized avatar
🍲
Hungry

Orion Anderson misterorion

🍲
Hungry
View GitHub Profile
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@misterorion
misterorion / upgrade-hugo.sh
Created November 9, 2018 16:32
Bash script to upgrade Hugo to a given version
#!/bin/bash
echo -e "Which release would you like to install? (e.g. 51): \c"
read version
file="hugo_0.${version}_Linux-64bit.tar.gz"
URL=https://github.com/gohugoio/hugo/releases/download/v0.$version/$file
target_dir="/home/$(whoami)/bin/"
@misterorion
misterorion / certbot-register.sh
Last active January 28, 2019 04:31
certbot script for dockerized wordpress add --dry-run for testing
#!/bin/bash
docker run -it --rm \
-v certs:/etc/letsencrypt \
-v certs-data:/data/letsencrypt \
-v /var/log/letsencrypt:/var/log/letsencrypt \
certbot/certbot certonly \
--webroot --register-unsafely-without-email --agree-tos \
--webroot-path=/data/letsencrypt \
-d origin.domain.com -d www.domain.com
@misterorion
misterorion / nginx.conf
Created August 29, 2018 18:15
nginx.conf for dockerized wordpress
worker_processes 1;
events {
worker_connections 1024;
multi_accept on;
}
http {
sendfile on;
@misterorion
misterorion / docker-compose.yml
Created August 29, 2018 18:12
docker-compose file for wordpress
version: "3"
services:
proxy:
depends_on:
- wordpress
image: nginx:alpine
container_name: proxy
ports:
#!/bin/bash
yum install -y docker
usermod -aG docker ec2-user
systemctl enable docker
curl -L https://github.com/docker/compose/releases/download/$1/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose