Skip to content

Instantly share code, notes, and snippets.

View thedeeno's full-sized avatar

Dane O'Connor thedeeno

View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@thedeeno
thedeeno / example.tf
Created July 10, 2018 19:59
can I haz foreach loop plz
variable "users" {
default = [
'dane',
'justin'
]
}
resource "aws_instance" "{{item}}" {
name = "{{item}}"
foreach = {{var.users}}
:host {
display: block;
height: 200px;
margin-top: 20px;
}
var log = require('broccoli-stew').log;
var Processor = function() {
this.name = 'component-bemifyer';
};
Processor.prototype.toTree = function(tree) {
return log(tree);
};
class SmartHash
def initialize(hash)
hash.each do |key, v|
instance_variable_name = "@#{key}"
if (v.hash?)
self.instance_variable_set(instance_variable_name, SmartHash.new(v))
else
self.instance_variable_set(instance_variable_name, v) ## create and initialize an instance variable for this key/value pair
end
# define the setter, getter
tail -f /var/log/dpkg.log &
pid=$(ps -e | grep tail | awk '{ print $1 }')
kill -15 $pid
@thedeeno
thedeeno / Dockerfile
Last active August 29, 2015 13:59
Demonstrate issue with signaling containers
from ubuntu:precise
entrypoint [ "tail" ]
cmd [ "-f", "/var/log/dpkg.log" ]
$/var/lib/docker/execdriver/native/c3b9d508981e6a912ea492a94373a71a8eff611c4961fac1bf1daec3d870dfab# nsinit -log=stderr exec
[exec] 2014/03/24 20:36:19 setns on 3
[exec] 2014/03/24 20:36:19 setns on 4
[exec] 2014/03/24 20:36:19 setns on 5
[exec] 2014/03/24 20:36:19 setns on 6
[exec] 2014/03/24 20:36:19 setns on 7
[exec] 2014/03/24 20:36:19 forking to remount /proc and /sys
panic: runtime error: index out of range
[exec] 2014/03/24 20:06:45 setns on 3
[exec] 2014/03/24 20:06:45 Failed to exec: setns invalid argument
# directory
./apps
./apps/foo
./apps/bar
./libs
./foo.docker
./bar.docker