Skip to content

Instantly share code, notes, and snippets.

View Sjeanpierre's full-sized avatar
💭
🤷🏿‍♂️

Stevenson Jean-Pierre Sjeanpierre

💭
🤷🏿‍♂️
View GitHub Profile
@Sjeanpierre
Sjeanpierre / list_env.rb
Created January 4, 2014 01:56
List environment variables used by ruby script
#!/bin/ruby
REGEX = Regexp.new('ENV\[\s*(\S.*?)\s*\]')
def report
list = list_found
if list.empty?
puts 'No environment variables found'
else
alias muxnew='tmux new -s'
alias muxlist='tmux list-sessions'
alias muxswitch='tmux switch -t'
alias muxsplit='tmux split-window -h'
alias muxdown='tmux select-pane -D'
alias muxup='tmux select-pane -U'
alias muxleft='tmux select-pane -L'
alias muxright='tmux select-pane -R'
alias muxnewtab='tmux new-window'
alias muxtab='tmux select-window -t'
@Sjeanpierre
Sjeanpierre / redis
Last active December 12, 2015 06:08
Monit configuration for Redis on platform servers
check process redis-server
with pidfile "/var/run/redis/redis.pid"
start program = "/etc/init.d/redis start"
stop program = "/etc/init.d/redis stop"
if cpu usage > 95% for 3 cycles then restart
if failed host localhost port 6379 then restart
if 5 restarts within 5 cycles then timeout
@Sjeanpierre
Sjeanpierre / redis.conf
Created December 12, 2012 02:34 — forked from anonymous/redis.conf
Spec and conf file for building redis on CentOS 5.8
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@Sjeanpierre
Sjeanpierre / dropbox
Created July 31, 2012 20:22 — forked from nyarla/dropbox
/etc/init.d/SpiderOak.sh
#!/bin/sh
# /etc/init.d/SpiderOak
### BEGIN INIT INFO
# Provides: SpiderOsk
# Required-Start: $network $syslog $remote_fs
# Required-Stop: $network $syslog $remote_fs
# Should-Start: $named $time
# Should-Stop: $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6