Skip to content

Instantly share code, notes, and snippets.

View elmer's full-sized avatar
:octocat:
exploring

Elmer Rivera elmer

:octocat:
exploring
View GitHub Profile
#!/bin/bash
release=$( lsb_release -c | awk '{ print $2 }' )
curl -s -o /tmp/pp.deb http://apt.puppetlabs.com/puppetlabs-release-$release.deb && sudo dpkg -i /tmp/pp.deb
curl -s -o - http://apt.puppetlabs.com/pubkey.gpg | sudo apt-key add -
sudo apt-get clean && sudo apt-get update && sudo apt-get -y install puppet=3.8.2-1puppetlabs1
#!/bin/sh
[ -f /root/.bootstrap ] && exit 0
grep proxy /etc/yum.conf || echo "proxy=http://10.50.10.250:3128" >> /etc/yum.conf
echo '
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.pregi.net/pub/Linux/CentOS/$releasever/os/$basearch/
@elmer
elmer / morphlabs-key
Created May 6, 2014 02:55
morphlabs-key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAv+ngbP8Kqk5WO4ucf5GXEy0fwUPtCua7jGO+bme/pdRnXSuwc2kV0pxQj0fhdEsTfIkMXgajgB7TV92/77v4Iktf+MHyLY1r81LhJiE//jXqZ6dopHz4WIJ17CCN4Ep5PeZkfK55hMw/g8VtYZvej2Rt/TrSqgKJiYdbRdPGueW/zh0bp5KPnAoPg/IQxoleWe2QbGwHtcWELSgd9G3cRNzuNOYEM9BRdGBitELw81RHXPUBiV44M3p2+mqKhaHkwj8eMOjz+nIl6ZLWTnXH1khST5f9AhvRMb+fYAeVPPTdS71qHh4pJrd6msdFIvGFpa1C4Dn5/Idq5gbhGyNgsQ== erivera@morphlabs.com
@elmer
elmer / keybase.md
Created October 16, 2014 01:55
keybase.md

Keybase proof

I hereby claim:

  • I am elmer on github.
  • I am ubuntunero (https://keybase.io/ubuntunero) on keybase.
  • I have a public key whose fingerprint is BEF8 6563 FB45 4734 1CA0 B377 678D 7C2D 26E5 8931

To claim this, I am signing this object:

in puppet.conf add (not needed in recent puppet versions, 3.5+ or something):
cadir = $ssldir/ca { mode = 775 }
cacert = $cadir/ca_crt.pem { mode = 664 }
csrdir = $cadir/requests { mode = 775 }
signeddir = $cadir/signed { mode = 775 }
in apache site add (change /etc/puppet/ssl to your ssldir path):
# Add fixture lib dirs to LOAD_PATH. Work-around for PUP-3336
#
if Puppet.version < "4.0.0"
Dir["#{fixture_path}/modules/*/lib"].entries.each do |lib_dir|
$LOAD_PATH << lib_dir
end
end
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <weppos@weppos.net>
# Copyright:: 2007-2009 The Authors
@elmer
elmer / gist:241140
Created November 23, 2009 15:56 — forked from anonymous/gist:161265
system admin 101
== Rules ==
On Infrastructure
-----------------
There is one system, not a collection of systems.
The desired state of the system should be a known quantity.
The "known quantity" must be machine parseable.
The actual state of the system must self-correct to the desired state.
The only authoritative source for the actual state of the system is the system.
The entire system must be deployable using source media and text files.
# you'd obviously have more settings somewhere
set :scm, :git
set :repository, "git@github.com:defunkt/github.git"
set :branch, "origin/master"
set :migrate_target, :current
set(:latest_release) { fetch(:current_path) }
set(:release_path) { fetch(:current_path) }
set(:current_release) { fetch(:current_path) }
@elmer
elmer / bundler-header.rb
Created March 18, 2010 22:56 — forked from leehambley/bundler-header.rb
bundle setup
begin
require File.expand_path('../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
require "bundler"
Bundler.setup
end