Skip to content

Instantly share code, notes, and snippets.

View lmickh's full-sized avatar
💭
Not outside

Lucas Harms lmickh

💭
Not outside
View GitHub Profile
yum --enablerepo=rpmforge,epel,remi -y install gcc make zlib zlib-devel openssl-devel zsh
cd /usr/local
git clone git://github.com/sstephenson/rbenv.git rbenv
mkdir rbenv/shims rbenv/versions
chgrp -R groupname rbenv
chmod -R g+rwxXs rbenv
git clone git://github.com/sstephenson/ruby-build.git ruby-build
cd ruby-build
./install.sh
@lmickh
lmickh / gist:6391619
Created August 30, 2013 16:21
Ruby issues after installing chruby on server that had chef client omnibus on it.
$ knife
/opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find chef (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.5, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.5] (Gem::LoadError)
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /usr/bin/knife:22:in `<main>'
@lmickh
lmickh / gist:6939292
Last active December 25, 2015 07:29
Razor install from base Centos6.4
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-7.noarch.rpm
yum install puppet
puppet module install puppetlabs-razor
vi razor.pp
> include razor
puppet apply razor.pp
yum install postgresql-server
chkconfig postgresql on
@lmickh
lmickh / gist:7138494
Created October 24, 2013 14:40
Device42.ovf
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by VMware ESX Server, User: root, UTC time: 2013-09-25T04:31:36.027072Z-->
<Envelope vmw:buildId="build-469512" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<References>
<File ovf:href="device42-disk1.vmdk" ovf:id="file1" ovf:size="1193865728" />
</References>
<DiskSection>
<Info>Virtual disk information</Info>
<Disk ovf:capacity="8" ovf:capacityAllocationUnits="byte * 2^30" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="2909274112" />
</DiskSection
@lmickh
lmickh / gist:7454831
Created November 13, 2013 19:25
Katello role requirements to register a server
Content View -> Subscribe Systems to Content Views
Environemtns -> Register Systems in Environment
Organiations -> Register Systems
# Not sure about all of the read requirements
Activation Keys -> Read Activation Keys
Content View -> Read Content Views
Content View Definitions -> Read Content View Definitions
Environments -> Read Systems in Environments
Environments -> Read Distributors in Environments
@lmickh
lmickh / certdump.go
Created February 1, 2017 23:16 — forked from tam7t/certdump.go
certdump consul-template plugin for writing vault-generated certificates to separate files
package main
import (
"io/ioutil"
"log"
"os"
"os/user"
"strconv"
)
@lmickh
lmickh / keybase.md
Created May 4, 2017 16:36
keybase.md

Keybase proof

I hereby claim:

  • I am lmickh on github.
  • I am lmickh (https://keybase.io/lmickh) on keybase.
  • I have a public key ASA0Y9suemvLe8rPi93RGqE4cUoRV5mDmG77Fe9Et2aO8wo

To claim this, I am signing this object:

@lmickh
lmickh / dotfiles-restore.sh
Last active October 10, 2017 19:43
dotfiles setup
git clone --bare <git-repo-url> $HOME/.dotfiles
alias dotfiles='/usr/bin/env git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
mkdir -p .config-backup && \
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
xargs -I{} mv {} .config-backup/{}
dotfiles checkout
dotfiles config status.showUntrackedFiles no
@lmickh
lmickh / README.md
Created April 24, 2019 22:37 — forked from joelthompson/README.md
Vault Auth
@lmickh
lmickh / vault-pki-setup
Created December 24, 2019 18:29
Setup Vault PKI with exported Root and intermediate
# Setup Root CA
vault secrets enable -path=/pki/example_com pki
vault secrets tune -max-lease-ttl=87600h /pki/example_com
vault write /pki/example_com/root/generate/exported common_name="example.com CA" key_type=ec key_bits=384 private_key_format=pem ttl=87600h
# Save output key and cert if you want to be able to restore this CA outside of Vault later.
# Setup Intermediate CA
vault secrets enable -path=/pki/example_com_inter pki
vault secrets tune -max-lease-ttl=87600h /pki/example_com_inter
vault write pki/example_com_inter/intermediate/generate/exported common_name="example.com Intermediate CA" key_type=ec key_bits=384 private_key_format=pem