Skip to content

Instantly share code, notes, and snippets.

@pburkholder
pburkholder / intermediate.sh
Created August 4, 2016 14:21
Run my CA with intermediate certs in a hurry:
#!/bin/bash -e
# https://jamielinux.com/docs/openssl-certificate-authority/index.html
target=qdev.govready.com
mkdir -p private certs newcerts
function root() {
echo generate root key
@pburkholder
pburkholder / .kitchen.yml
Last active July 13, 2016 10:57
test-kitchen files for deploying GovReady-Q
---
driver:
name: vagrant
network:
- ["forwarded_port", {guest: 8000, host: 8080}]
provisioner:
name: shell
log_level: debug
function vault-demo-ids() {
 aws autoscaling \
     describe-auto-scaling-groups --auto-scaling-group-names vault-provision |
   jq -r '[.AutoScalingGroups[].Instances[].InstanceId] | join(" ")'
 }


function vault-demo-ips() {
 instance_ids=$(vault-demo-ids)
@pburkholder
pburkholder / lean_coffee.md
Created December 22, 2015 15:46 — forked from justinredd/lean_coffee.md
Lean Coffee

Lean Coffee

  • 60 - 90 minutes
  • 5 - 11 people

Materials

  • Table + chairs
  • PostIts and Pens
  • Timer
mysql_client 'default' do
version node['mysql']['version']
action [:create]
end
file '/etc/my.cnf' do
content <<-END
[client]
default-character-set = utf8
socket = /var/run/mysql-default/mysqld.sock

Running killssh with patched version of net-ssh

From project dir:

git clone https://github.com/causton81/net-ssh.git
cd net-ssh
git checkout causton81/channel_close_after_output
cd ..
@pburkholder
pburkholder / profiles.md
Last active November 25, 2015 17:28
test-kitchen creation profiles

windows_tk

MacBook pro Retina 15-inch mid-2014 2.8Ghz i7 16Gb 1600Mhz DDR3

VMWARE fusion opentable-win-2008r2-standard-amd64-nocm

[pburkholder@cheffian windows_tk]$ kitchen create
@pburkholder
pburkholder / NOTES.md
Created November 23, 2015 14:49
Where I am with memory forencsics

LiME builds lime.ko -- See analytics.cheffian.com

insmod lets you export memory over port 4444, and then from workstation ssh ubuntu@chefserver.cheffian.com -L 4444:localhost:4444

insmod lime.....ko "path=tcp:4444 format=lime'
nc localhost 4444 > chefserver.lime

volatility stuff is in ~/Hacks/volatilty

@pburkholder
pburkholder / docker.md
Created November 8, 2015 10:56
Interesting commands inside docker

Interesting commands to run inside a docker container

Try docker -i -t --name ubuntu:trusty --name trusty /bin/bash and look at:

whoami
ps -ef # what is PID 1?
bash; ps -ef
df
uname -a
@pburkholder
pburkholder / mycpu.rb
Last active September 24, 2015 19:58
Adding a plugin to add additional attributes to the Mash is almost too easy:
# save as /some/path/to/plugin/mycpu.rb
# ohai -d /some/path/to/plugin cpu
Ohai.plugin(:Cpu) do
provides "cpu"
collect_data do
cpu[:cores] = cpu[:total] * cpu["0"]["cores"].to_i
end
end