Skip to content

Instantly share code, notes, and snippets.

View jaychakra's full-sized avatar
🏠
Working from home

Jay Chakra jaychakra

🏠
Working from home
  • Self Employed
  • New Delhi
View GitHub Profile
@jaychakra
jaychakra / A Variety tumblr quotes plugin.md
Last active February 7, 2017 10:40 — forked from cmfcmf/A Variety tumblr quotes plugin.md
Variety (An automatic wallpaper changer, downloader and manager for Linux, http://peterlevi.com/variety) tumblr quotes plugin.

Variety tumblr quotes plugin

Installation

  1. Copy the tumblr.py file into ~/.config/variety/plugins/quotes.
  2. Restart variety.
  3. Activate the plugin under Effects -> Quotes -> Sources and filtering.
  4. Under authors, enter the blog names you want to get quotes from (.tumblr.com will be added automatically).
  5. That's it!

Notes

@jaychakra
jaychakra / MySQL Replication Check
Created December 8, 2015 10:09 — 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=""
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 }')