Skip to content

Instantly share code, notes, and snippets.

@flickerfly
flickerfly / start_docker_registry.bash
Created September 10, 2020 20:39 — forked from u1i/start_docker_registry.bash
Start docker registry with letsencrypt certificates and Basic Auth
#!/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
@flickerfly
flickerfly / darkify_slack.css
Last active May 28, 2019 16:18 — forked from ryanpcmcquen/darkify_slack.sh
Darkify your Slack.
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 January 16, 2017 17:38 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

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 February 22, 2022 15:55 — forked from ssimpson89/MySQL Replication Check
Just a simple Mysql Replication Health Check script I wrote. You can put this in a cron.
#!/bin/bash
### VARIABLES ### \
[email protected]
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 }' )