Skip to content

Instantly share code, notes, and snippets.

@mattsgarrison
mattsgarrison / hubot_service.sh
Created January 6, 2012 16:51
Start/Stop script to manage Hubot with Monit
#!/bin/zsh
### BEGIN INIT INFO
# Provides: hubot
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the hubot service
# Description: starts the Hubot bot for the Campfire rooms
@dansimau
dansimau / pgprepmgr.sh
Created January 9, 2012 10:57
Wrapper for pgpools' pcp tools to help you manage your pgpool setup and postgresql cluster. See usage in the comment below.
#!/bin/bash
#
# pgpool-II replication manager
#
# Interfaces with pgpool's pcp command-line tools to provide access to common functions for managing
# load-balancing and failover.
#
# dsimmons@squiz.co.uk
# 2011-08-28
@cobyism
cobyism / osx-install-media.md
Last active March 11, 2023 00:42
Command to create installable OS X USB drive.

Creating a bootable macOS USB installer

  • First, plug in an 8GB (or bigger) USB drive, and use Disk Utility to erase it
  • If you use the default settings, you should wind up with a blank drive at /Volumes/Untitled.

With that volume in place, and with the macOS installer sitting in /Applications/Install\ macOS\ [VERSION].app, run the following command in your terminal to create a bootable install media (for Sierra):

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
@joecannatti
joecannatti / gist:7219927
Last active December 26, 2015 21:59
talk
Ruby is a complex programming language. It’s power comes from the richness and flexibility of the language’s features.
There’s so many cool and interesting bits to ruby, that sometimes we don’t take the time to fully grok them all.
It’s possible to use a Ruby feature everyday, but not really understand how it works.
In this talk, we’ll dig deep into 5 of the most commonly misunderstood aspects of programming in Ruby.
Geared mostly towards newer Ruby devs, but there’ll certainly be something for everyone!
* Code evaluation time
* Methods called while defining a class (attr_accessor, has_many, etc)