Skip to content

Instantly share code, notes, and snippets.


Scott M. Likens damm

  • Seattle, Washington USA
View GitHub Profile
markwalkom / logstash.conf
Last active Apr 27, 2020
Reindexing Elasticsearch with Logstash 2.0
View logstash.conf
input {
elasticsearch {
hosts => [ "HOSTNAME_HERE" ]
port => "9200"
size => 1000
scroll => "5m"
docinfo => true
scan => true
rosskukulinski / cloud_config
Created Oct 10, 2014
CoreOS cloud_config for Rackspace Public Cloud
View cloud_config
public-ip: $public_ipv4
metadata: region=dfw,provider=rackspace
# multi-region and multi-cloud deployments need to use $public_ipv4
# We'll actually fill this in using (see below)
# addr: $rax_privatenet_ipv4:4001
fnichol /
Last active Nov 19, 2019
Auto-enable Local HTTP Caching in Test Kitchen

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:


  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)
pnasrat / gist:7327338
Created Nov 5, 2013
Using nsenter and docker
View gist:7327338
/ # root@precise64:~/util-linux# docker ps
71546cef7b56 busybox:latest sleep 3600 16 minutes ago Up 16 minutes pink_monkey
root@precise64:~/util-linux# docker inspect 71546cef7b56 | grep Pid
"Pid": 10614,
root@precise64:~/util-linux# ./nsenter --mount -t 10621 /usr/bin/sh
BusyBox v1.19.3 (Ubuntu 1:1.19.3-7ubuntu1.1) built-in shell (ash)
Enter 'help' for a list of built-in commands.
View gist:6440981
docker run -e SETTINGS_FLAVOR=prod -e AWS_ACCESS_KEY_ID=$aws_access_key -e AWS_SECRET_KEY=$aws_secret_key -e S3_BUCKET=$s3_bucket -e WORKER_SECRET_KEY=$worker_key -p 5000:5000 -m 0 samalba/docker-registry
jtimberman / rename-node.rb
Created Mar 2, 2012 — forked from mpasternacki/rename-node.rb
A knife exec script to change Chef node's name.
View rename-node.rb
#!./bin/knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
# Usage: knife exec rename-node.rb old-name new-name
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
jtimberman / gist:639638
Created Oct 21, 2010 — forked from btm/gist:639581
different ways to get interface IPs
View gist:639638
$ grep 'node\[:network\]\[:interfaces\].' \#chef.log
10:15 < mkent_> node[:network][:interfaces][:eth1][:addresses]
22:24 <+Damm> msf, just pulling in the node[:network][:interfaces] attributes
20:44 < randybias> node[:network][:interfaces][:eth0][:addresses]
09:13 < sinBot> so fujin if I wanted to use that in an erb template, it'd be <%= @node[:network][:interfaces]["en1"]["addresses"].select{address}.flatten.to_str %> ?
12:27 < cwj> if i have an ipv4 ip address set on eth0, will it always be in @node[:network][:interfaces][:eth0][1] ?
02:19 < pluesch0r> however, i don't seem to be able to access @node[:network][:interfaces]... from inside the attributes file.
19:52 <@jtimberman> or node[:network][:interfaces][:eth0][:addresses][0]
20:09 < seryl> well, it's searchable. I'm trying the @node[:network][:interfaces][:eth0][:addresses][0] route, but getting blanks right now, playing around with it in chef solo
20:29 < kallistec> pp node[:network][:interfaces].current_attribute