Skip to content

Instantly share code, notes, and snippets.

View clifferson's full-sized avatar

Cliff Erson clifferson

  • Riot Games
  • Las Vegas
View GitHub Profile
file "/path/to/file" do
inherits True
end
@clifferson
clifferson / gist:34b925965ba20d4f3c11
Created August 20, 2014 01:47
extend a lvm logical volume to all the free space
lvextend -l +100%FREE /dev/vg_name/lv_name
[ ] erlang-R14B-04.3.el6.x86_64.rpm 20-Nov-2013 21:46 26K
[ ] erlang-amf-0-0.6.20110224gitb36dfb6.el6.x86_64.rpm 09-May-2012 19:32 45K
[ ] erlang-appmon-R14B-04.3.el6.x86_64.rpm 20-Nov-2013 21:46 145K
[ ] erlang-asn1-R14B-04.3.el6.x86_64.rpm 20-Nov-2013 21:46 1.0M
[ ] erlang-basho_stats-1.0.3-1.el6.x86_64.rpm 12-Mar-2013 00:42 12K
[ ] erlang-bear-0.1.3-1.el6.x86_64.rpm 09-Mar-2013 10:32 21K
[ ] erlang-bitcask-1.6.1-1.el6.x86_64.rpm 08-Apr-2013 21:56 749K
[ ] erlang-cluster_info-1.2.3-1.el6.x86_64.rpm 12-Mar-2013 00:42 25K
[ ] erlang-common_test-R14B-04.3.el6.x86_64.rpm 20-Nov-2013 21:46 508K
[ ] erlang-compiler-R14B-04.3.el6.x86_64.rpm
@clifferson
clifferson / gist:732f34839bc0ea434f49
Last active August 29, 2015 14:01
Notes on Upstart

Job config file

lives in /etc/init/service.conf

Start/stop an Upstart controlled service

  • "start servicename"
  • "stop servicename"

Reload upstart when adding a new config

  • "initctl reload-configuration"
@clifferson
clifferson / gist:7345596
Last active December 27, 2015 15:09
Using shell to install chef to use ruby to configure your mac!

What?

Use chef-solo driven by soloist to apply recipes to a mac and configure it just how you like.

bit.ly/chef4mac < this presentation (meta)

What is chef-solo and soloist

  • chef-solo : Dont concern yourself with this much?
@clifferson
clifferson / gist:5834687
Created June 21, 2013 22:03
install pcre on a virtual box OSX.
brew install -vd pcre
@clifferson
clifferson / gist:5440326
Created April 23, 2013 02:20
Find out what repo an rpm was installed from
yum-utils provides repoquery
For a single package, you can find this with
repoquery -i package
PACKAGE=ruby-enterprise
repoquery --qf "%{repoid}" $PACKAGE
Replace $PACKAGE with the name of the package you care about.
@clifferson
clifferson / Vagrantfile
Last active December 12, 2015 01:08
Vagrantfile for celery using rabbitmq and worker recipe.
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'berkshelf/vagrant'
Vagrant::Config.run do |config|
config.vm.host_name = "celery-berkshelf"
#config.vm.box = "Berkshelf-CentOS-6.3-x86_64-minimal"
#config.vm.box_url = "https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box"
@clifferson
clifferson / gist:4576573
Created January 20, 2013 03:50
Compact couchdb with curl
curl -H "Content-Type: application/json" -X POST http://localhost:5984/chef/_compact
@clifferson
clifferson / gist:4570717
Created January 19, 2013 04:17
If your chef-server checksum dir gets out of whack with couchdb
/usr/bin/find /var/cache/chef/checksums/ -maxdepth 1 -type f -ctime +1 -delete
Then delete all the checksums in CouchDB using Shef:
require 'chef/checksum'
r = Chef::REST.new('http://localhost:5984/chef/_design/checksums/_view/', false, false)
r.get_rest("all")["rows"].each do |c| c["value"].cdb_destroy end