Skip to content

Instantly share code, notes, and snippets.

View alexindigo's full-sized avatar
💭
I may be slow to respond.

Alex Indigo alexindigo

💭
I may be slow to respond.
  • Palo Alto, CA
View GitHub Profile
@alexindigo
alexindigo / redis-server-for-init.d-startup
Created February 21, 2011 10:58 — forked from peterc/redis-server-for-init.d-startup
Redis init.d file for Ubuntu/Debian
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@alexindigo
alexindigo / LICENSE.txt
Created May 21, 2011 05:20 — forked from madrobby/LICENSE.txt
Mock objects
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@alexindigo
alexindigo / .bashrc
Created June 9, 2011 07:29
.bashrc for debian with screen support
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
@alexindigo
alexindigo / .screenrc
Created June 9, 2011 07:58
my .screenrc
termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti@:te@
backtick 1 10 10 me
backtick 2 10 10 ut
caption string "%?%F%{= Bk}%? %C%A %D %d-%m-%Y %{= kB} %t%= %?%F%{= Bk}%:%{= wk}%? %n "
hardstatus alwayslastline '%{= kG}[ %{.K}%1` %{g}][%= %{= kK}%?%-Lw%?%{W}%n*%f%t%?(%u)%?%{K}%?%+Lw%?%?%= %{g}][%{.K} %l | %2` | %C%a %{g}]'
startup_message off
vbell off
defutf8 on
bind c screen 1
bind 0 select 10
@alexindigo
alexindigo / nginx
Created July 10, 2011 21:04
Nginx init.d file for Debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@alexindigo
alexindigo / node_debian_init.sh
Created July 17, 2011 21:42 — forked from peterhost/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#! /bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
@alexindigo
alexindigo / redis.conf
Created October 23, 2011 02:08 — forked from carlzulauf/redis.conf
Redis upstart script (/etc/init/)
description "redis server"
start on runlevel [2345]
stop on shutdown
expect fork
exec sudo -u redis /usr/local/bin/redis-server /usr/local/etc/redis.conf
respawn
@alexindigo
alexindigo / redis.conf
Created December 26, 2011 02:02
redis.conf stage
# Redis configuration file
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
# units are case insensitive so 1GB 1Gb 1gB are all the same.
@alexindigo
alexindigo / varnish.conf
Created December 26, 2011 09:14
Varnish upstart script
description "varnish daemon"
start on runlevel [2345]
stop on shutdown
expect fork
exec /usr/local/sbin/varnishd -f /usr/local/etc/varnish/default.vcl -s malloc,64MB -T 127.0.0.1:2000
respawn
@alexindigo
alexindigo / postgres.conf
Created January 3, 2012 17:07
Postgres upstart script (/etc/init)
description "postgres server"
start on runlevel [2345]
stop on shutdown
expect fork
exec sudo -u postgres /usr/local/bin/postgres -D /var/db/postgres
respawn