Skip to content

Instantly share code, notes, and snippets.

@haus
haus / calc.rb
Last active February 12, 2018 18:56 — forked from justinstoller/calc.rb
#!/usr/bin/env ruby
require 'csv'
require 'zlib'
path = ARGV[0]
hours = ARGV[1]
csv = nil
options = {col_sep: "\t"}
General:
Currently, there are several cases regarding database setup in the PE installer. Note that the database setup routines only occur if the console is selected for install.
1) the installer checks for the existence of mysql.
* If it is found, the installer asks if the mysql server is running on a remote host. if it is remote, the user is prompted to enter host
and port information. if it is not remote, the installer assumes the mysql server is hosted on the current stations.
* If it is not found, the installer asks if the user would like to install MySQL server. If yes, the installer proceeds directly to step 3, below, skipping step 2.
Note: the install *will exit* if the user opts not to install MySQL server at this point. The installer does not support installing MySQL client only.
@haus
haus / rabbitmq
Created May 18, 2012 07:04 — forked from three18ti/rabbitmq
class RabbitMQ {
package { 'rabbitmq-server':
ensure => present,
require => Exec['add_rabbitmq_repository'],
}
exec { "wget -O- http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - && apt-get update"
alias => 'add_rabbitmq_repository',
require => File["/etc/apt/sources.list.d/rabbitmq.list"],
unless => "dpkg -l rabbitmq-server",