Skip to content

Instantly share code, notes, and snippets.

View flaccid's full-sized avatar

Chris Fordham flaccid

View GitHub Profile
@flaccid
flaccid / PKGBUILD
Created November 3, 2012 07:35
PKGBUILD for rightscale archlinux package from binary deb pkg
# Maintainer: Chris Fordham <chris@xhost.com.au>
pkgname=rightscale
pkgver=5.8.8
pkgrel=1
epoch=
pkgdesc=""
arch=('x86_64')
url="http://rightscale.com/"
license=('RightScale')
groups=()
@flaccid
flaccid / gist:1407099
Created November 29, 2011 23:16
install fog with chef
gem_package "fog"
script "test_fog" do
interpreter "/usr/bin/ruby"
code <<-EOH
require 'fog'
EOH
end
@flaccid
flaccid / gist:1271496
Created October 7, 2011 22:38
some postgresql tuning
#!/opt/rightscale/sandbox/bin/ruby
puts '= postgresql-tune ='
system 'psql --version'
PGDATA = `echo -n /etc/postgresql/*/main`
require 'rubygems'
require 'ohai'
require "ftools"
# Cookbook Name:: rs_utils
# Recipe:: setup_timezone
#
# Copyright (c) 2011 RightScale Inc
#
# 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
@flaccid
flaccid / gist:1205515
Created September 9, 2011 04:52
RightScript: Install & configure Jenkins CI Server
#!/bin/bash -e
# RightScript: Install & configure Jenkins CI Server
# this script uses process management techniques to detach parent processes that have childs that don't detach as well as effectively delay events due to the backgrounding
# for verification on the instance, use:
# tail -f /var/log/messages /var/log/jenkins-install.log
log_file="/var/log/jenkins-install.log"
# Cookbook Name:: mongodb
# Recipe:: relocate_dbpath
#
# Copyright 2010, RightScale Inc.
#
# Author: Chris Fordham <chris.fordham@rightscale.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
********************************************************************************
*RS> Configuring software repositories ****
*RS> Using the following software repositories:
*RS> - Yum::CentOS::Extras ["http://ec2-eu-west-mirror.rightscale.com/centos",
*RS> "http://ec2-eu-west-mirror1.rightscale.com/centos",
*RS> "http://ec2-us-east-mirror.rightscale.com/centos",
*RS> "http://ec2-us-east-mirror1.rightscale.com/centos",
*RS> "http://ec2-us-east-mirror2.rightscale.com/centos"] @ 2010-10-19
*RS> - Apt::Ubuntu::Jaunty
*RS> ["http://ec2-eu-west-mirror.rightscale.com/ubuntu_daily",
@flaccid
flaccid / gist:865285
Created March 11, 2011 01:01
/opt/rightscale/lib/shell_utilities.rb
We couldn’t find that file to show.
@flaccid
flaccid / rs-update-server-array
Created January 21, 2011 02:45
rs-update-server-array
#!/usr/bin/ruby
# rs-update-server-array
require 'rubygems'
require 'getoptlong'
require 'json'
require 'rest_connection'
def usage