Skip to content

Instantly share code, notes, and snippets.

View rrrodrigo's full-sized avatar

Marcin Bajer rrrodrigo

View GitHub Profile
@rrrodrigo
rrrodrigo / redis-server-for-init.d-startup
Created February 11, 2011 09:44 — forked from enaeseth/redis-server-for-init.d-startup
fork of eneaseth's init script adjusted for multiple redis-server instances, each with it's config, log, pid and port
#! /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
# Nginx config for Hudson CI behind a virtual host with SSL.
# Replace hudson.example.com with your domain name.
# Upstream Hudson server, e.g.: on port 3001
upstream hudson {
server localhost:3001
}
# Redirect all HTTP requests to HTTPS.
server {

Copy this script to ".git/hooks/post-checkout" in your repository and make it executable:

chmod +x .git/hooks/post-checkout

Tweak it at will. I'm refreshing the bundle and restarting the app server because the Gemfile is different on my "hosted" branch than on other branches.