Skip to content

Instantly share code, notes, and snippets.

Avatar

Josiah Ritchie flickerfly

View GitHub Profile
@flickerfly
flickerfly / start_docker_registry.bash
Created Sep 10, 2020 — forked from u1i/start_docker_registry.bash
Start docker registry with letsencrypt certificates and Basic Auth
View start_docker_registry.bash
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
View darkify_slack.css
body{
background:#222;
color:#e6e6e6
}
a{
color:#949494
}
a:link,a:visited{
color:#949494
}
@flickerfly
flickerfly / upgrade-postgres-9.3-to-9.5.md
Created Jan 16, 2017 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu
View upgrade-postgres-9.3-to-9.5.md

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
@flickerfly
flickerfly / MySQL Replication Check
Last active Mar 25, 2020 — forked from ssimpson89/MySQL Replication Check
Just a simple Mysql Replication Health Check script I wrote. You can put this in a cron.
View MySQL Replication Check
#!/bin/bash
### VARIABLES ### \
EMAIL=flickerfly@email.com
SERVER=$(hostname)
MYSQL_CHECK=$(mysql -e "SHOW VARIABLES LIKE '%version%';" || echo 1)
SLAVE_STATUS=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G"|grep -v row)
LAST_ERRNO=$(echo "${SLAVE_STATUS}" | grep "Last_Errno:" | awk '{ print $2 }' )
SECONDS_BEHIND_MASTER=$(echo "${SLAVE_STATUS}" | grep "Seconds_Behind_Master:" | awk '{ print $2 }' )
IO_IS_RUNNING=$(echo "${SLAVE_STATUS}" | grep "Slave_IO_Running:" | awk '{ print $2 }' )