Skip to content

Instantly share code, notes, and snippets.

View epleterte's full-sized avatar

Christian Bryn epleterte

  • I am on the Internet
View GitHub Profile
// ==UserScript==
// @name watchcartoononline
// @description Description
// @author Chris H (Zren / Shade)
// @icon http://xshade.ca/favicon.ico
// @namespace http://xshade.ca
// @version 1
// @grant none
// @include http://www.watchcartoononline.com/*
// @include http://www.animeuploads.com/embed.php*
@epleterte
epleterte / .tmux.conf
Created May 25, 2012 07:51 — forked from aaronjensen/.tmux.conf
robust tmux zoom toggle
# zoom
unbind ^M
bind ^M new-window -d -n zoom 'tmux-zoom'
@epleterte
epleterte / role.rb
Created September 17, 2012 23:07 — forked from tommybotten/role.rb
Example fact to determine the role of a server
# Fact: role
#
# Purpose:
# Return the installed and running applications on the system.
#
# FIXME: Add amq, varnish,
# FIXME: As of now, interpreting/matching text and not return codes :(
Facter.add(:role) do
setcode do
@epleterte
epleterte / rackup.sh
Created October 4, 2012 16:51
Better, untested rackup
#!/bin/bash -ue
/usr/bin/curl -s -k -F userfile=@<( /usr/bin/facter ) -u user:pass "https://racktables/index.php?page=depot&tab=facter&op=Update" > /dev/null 2>&1
@epleterte
epleterte / catalina.logrotate
Created October 12, 2012 13:54
Logrotate, catalina.out
# logrotate suggestion for catalina
/apps/tomcat/*/logs/catalina.out {
copytruncate
daily
rotate 5
compress
notifempty
missingok
size 100M
}
@epleterte
epleterte / mysql_rep.sh
Created November 4, 2015 09:22 — forked from onecooltaco/mysql_rep.sh
A mysql replication plugin for the check_mk nagios system
#!/bin/bash
#
# A mysql replication plugin for the check_mk nagios system.
# Place me in /usr/lib/check_mk_agent/local on the client
#
# Hereward Cooper <coops@iomart.com> - 16/06/11
MYSQL_USER="root"
MYSQL_PASS="PAassw0rd"
@epleterte
epleterte / gist:4341982
Last active December 9, 2015 23:08
resize logical volumes in volume groups on multipath devices only works with one logical volume per volume group
#!/bin/bash -ue
function list_paths() {
multipath -ll -v 1
}
function print_usage() {
cat <<EOF
Multipath device resizer
Resize multipath device if one LV in one VG on a multipath device PV
@epleterte
epleterte / gist:4634149
Last active December 11, 2015 17:28
postgresql-backup
#!/bin/bash -ue
# Postgres backup script
# Christian Bryn
backup_mountpoint="/var/nfs-backup"
backup_path="${backup_mountpoint}/${HOSTNAME}/postgresql"
[ ! -d "${backup_path}" ] && mkdir -p "${backup_path}"
#backup_timestamp=$( date '+%d' )
@epleterte
epleterte / mygrants.sh
Created March 19, 2013 14:30
mygrants!
# cool mysql grants printing function (producing proper sql) - http://serverfault.com/a/13050
# example:
# mygrants --host=prod-db1 --user=admin --password=secret | grep rails_admin | mysql --host=staging-db1 --user=admin --password=secret
mygrants()
{
@epleterte
epleterte / wildpingpong.sh
Last active December 18, 2015 02:59
Wild asian ping pong in the wild
#!/bin/bash -ue
# ANIMATE them wild asian ping pong players
# chr.bryn@gmail.com
# Q( - _-)_____¦___o__Q(-_ - )
court_length=12
speed="0.3"
colors="false"
clear="false"