Skip to content

Instantly share code, notes, and snippets.

View codec's full-sized avatar

codec

  • Munich
  • 01:29 (UTC +02:00)
View GitHub Profile
#! /usr/bin/env ruby
require 'rubygems'
require 'sinatra/base'
require 'webrick'
#require 'webrick/https'
#require 'openssl'
require 'resolv'
require 'json'
@ChrisLundquist
ChrisLundquist / elasticsearch.coffee
Created November 10, 2012 11:04
elasticsearch plugin for Hubot
# Description:
# Log all the things to ElasticSearch then lets you ask hubot what you missed
#
# Dependencies:
# None
#
# Configuration:
# ELASTICSEARCH_HOSTNAME - E.G. elasticsearch.example.com:9200, where to send the put requests
# ELASTICSEARCH_USERNAME - OPTIONAL basic auth username
# ELASTICSEARCH_PASSWORD - OPTIONAL basic auth password
@cowboy
cowboy / create_108_usb_install.sh
Created July 29, 2012 13:33
bash: Create a 10.8 "USB Install Stick" from InstallESD.dmg
#!/bin/bash
# Before running this script, open Disk Utility.
#
# Partition USB Stick:
# * 1 Partition
# * Options -> GUID Partition Table
# * Mac OS Extended (Journaled)
# * Name: Foobar
#
@somebox
somebox / nginx.conf
Created March 13, 2012 16:19
Nginx error page handling
# The following recipe works with upstream rails proxy for custom 404s and 500s.
# Errors are usually handled via rails except if proxy is really down, in which case
# nginx needs a bit more configration.
server {
# ...
location / {
error_page 404 = @rails; # let rails show a page with suggestions
try_files maintenance.html @rails;