Skip to content

Instantly share code, notes, and snippets.

Avatar

Joey Geiger jgeiger

View GitHub Profile
View install-redis.sh
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/dfetterman/cf7bc4aa53c47fb546c6/raw/e11cd22f41e6cab71fe621b1f5a1377ff3af01ab/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
View redis-server-for-init.d-startup
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@jgeiger
jgeiger / redis.conf
Last active August 29, 2015 14:04 — forked from dfetterman/redis.conf
Redis configuration
View redis.conf
# 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
@jgeiger
jgeiger / redis-server.conf
Last active August 29, 2015 14:05
Redis upstart conf
View redis-server.conf
description "Redis Server"
author "Thomas Woolford <thomas@urpages.com.au>"
# run when the local FS becomes available
start on local-filesystems
stop on shutdown
# The default redis conf has `daemonize = yes` and will naiively fork itself.
expect fork
@jgeiger
jgeiger / monitrc
Last active August 29, 2015 14:05
monitrc
View monitrc
###############################################################################
## Monit control file
###############################################################################
##
## Start Monit in the background (run as a daemon):
set daemon 60 # check services at 1-minute intervals
set logfile syslog facility log_daemon
@jgeiger
jgeiger / nginx.conf
Created August 13, 2014 21:32
nginx upstart config
View nginx.conf
description "nginx http daemon"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/local/nginx/sbin/nginx
env PIDFILE=/usr/local/nginx/logs/nginx.pid
# Needed to allow Nginx to start, however, the wrong PID will be tracked
expect fork
@jgeiger
jgeiger / nginx.conf
Created August 13, 2014 21:29
Nginx monit conf file
View nginx.conf
# nginx
check process nginx with pidfile /usr/local/nginx/logs/nginx.pid
start program = "/sbin/start nginx"
stop program = "/sbin/stop nginx"
if failed host 127.0.0.1 port 80 then restart
if cpu is greater than 40% for 2 cycles then alert
if cpu > 60% for 5 cycles then restart
if 10 restarts within 10 cycles then timeout
@jgeiger
jgeiger / redis-server.conf
Last active August 29, 2015 14:05 — forked from cyx/gist:3690597
Redis server monit config for upstart
View redis-server.conf
check process redis-server
with pidfile "/var/run/redis.pid"
start program = "/sbin/start redis-server"
stop program = "/sbin/stop redis-server"
if 2 restarts within 3 cycles then timeout
if failed host 127.0.0.1 port 6379 then restart
if 5 restarts within 5 cycles then timeout
@jgeiger
jgeiger / mmonit.conf
Created August 24, 2014 21:01
M/Monit config file
View mmonit.conf
# This is an upstart script to keep mmonit running.
# Put this script here:
#
# /etc/init/mmonit.conf
#
# and reload upstart configuration:
#
# initctl reload-configuration
#
# You can manually start and stop monit like this:
@jgeiger
jgeiger / git_commit_example.txt
Created November 19, 2014 16:22
Git commit message format
View git_commit_example.txt
50 characters of description (within reason)
Longer descriptions to 72 characters (within reason)
Longer descriptions to 72 characters (within reason)
Longer descriptions to 72 characters (within reason)
[#tracker_story_id]
or for multiple stories