Skip to content

Instantly share code, notes, and snippets.

View arsenio's full-sized avatar

Arsenio Santos arsenio

View GitHub Profile
@arsenio
arsenio / golden-ratio-line-height.styl
Created December 16, 2014 01:59
Golden Ratio typography mixin and function for Stylus CSS preprocessor
// Simple Stylus functions for approximating a golden-ratio line height,
// based on a font size and target content width.
//
//
// goldenRatio(font-size, content-width)
// * given font size and content width, generate the font size, height, and width
//
// Usage:
// div.readable
// goldenRatio 20px 550px
@arsenio
arsenio / check_redis.py
Last active December 19, 2015 12:19
A better NRPE plugin for checking Redis, including optional slave monitoring. Based on the work of Samuel Stauffer (see https://gist.github.com/samuel)
#!/usr/bin/python
# Originally written by Samuel Stauffer <https://gist.github.com/samuel>
# Modified by Arsenio Santos <arsenio@gmail.com>
from __future__ import division
import socket
import sys
from optparse import OptionParser
EXIT_OK = 0
@arsenio
arsenio / .inputrc
Created April 18, 2013 17:07
my .inputrc (non-Darwin)
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
@arsenio
arsenio / .bash_profile
Created January 14, 2013 17:06
My .bash_profile
export EDITOR=/usr/bin/vim
export JAVA_HOME=/usr
alias vi='/usr/bin/vim'
alias scr='screen'
alias s-r='screen -r'
alias s-d='screen -d'
alias d='screen -r && screen -d'
alias ls='ls -F'
@arsenio
arsenio / check_redis
Created May 21, 2012 22:53
My plugin for checking a redis server (free mem, frag ratio, last save)
#!/bin/bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@arsenio
arsenio / .screenrc
Created February 17, 2012 03:07
my .screenrc
# ------------------------------------------------------------------------------
# SCREEN SETTINGS
# ------------------------------------------------------------------------------
startup_message off
#nethack on
#defflow on # will force screen to process ^S/^Q
deflogin on
#autodetach off
@arsenio
arsenio / scribed
Created April 19, 2011 17:36
scribed startup script
#!/bin/bash
# Starts and stops scribed
# arsenio@gmail.com
#
# chkconfig: 2345 90 10
# description: Scribe daemon
desc="Scribed daemon"
LOGDIR=/var/log/scribe