Skip to content

Instantly share code, notes, and snippets.

View filbertkm's full-sized avatar
😺

Katie Filbert filbertkm

😺
View GitHub Profile
@Ladsgroup
Ladsgroup / Badwords
Last active December 21, 2021 01:32
Bad words of Wikipedia
List of words that are common in reverted edits but not in not-reverted edits in Wikipedia, divded by language.
@ssimpson89
ssimpson89 / MySQL Replication Check
Last active April 30, 2022 13:54
Just a simple Mysql Replication Health Check script I wrote. You can put this in a cron.
#!/bin/bash
### VARIABLES ### \
EMAIL=""
SERVER=$(hostname)
MYSQL_CHECK=$(mysql -e "SHOW VARIABLES LIKE '%version%';" || echo 1)
LAST_ERRNO=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Last_Errno" | awk '{ print $2 }')
SECONDS_BEHIND_MASTER=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G"| grep "Seconds_Behind_Master" | awk '{ print $2 }')
IO_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_IO_Running" | awk '{ print $2 }')
SQL_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_SQL_Running" | awk '{ print $2 }')
@scottjacobsen
scottjacobsen / git+clone+ssh+agent+forward+sudo
Created December 14, 2012 00:07
Git clone using ssh agent forwarding and sudo
SSH agent forwarding is great. It allows you to ssh from one server to
another all the while using the ssh-agent running on your local
workstation. The benefit is you don't need to generate ssh key pairs
on the servers you are connecting to in order to hop around.
When you ssh to a remote machine the remote machine talks to your
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK
environment variable.
So you the remote server you can do something like: