Skip to content

Instantly share code, notes, and snippets.

Kevin Gilpin kgilpin

Block or report user

Report or block kgilpin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kgilpin / basic-org.rb
Last active Aug 29, 2015
Conjur Policy - Basic Organization
View basic-org.rb
test_layer = nil
group "security_admin" do
owns do
scope "v1" do
ops = group "ops" do
owns do
test_layer = layer "test"
layer "production"
kgilpin /
Last active Dec 26, 2015
Create Conjur "bacon" resource
$ conjur resource:create food:$ns/bacon
"id": "sandbox:food:1eqwg0/bacon",
"owner": "sandbox:user:kgilpin",
"permissions": []
kgilpin / gist:3873480
Created Oct 11, 2012
Find a free drive letter
View gist:3873480
# Need to find the next available device to let AWS know where to attach
# the volume
drive = (Array('c'..'z').map{|c| "/dev/xvd#{c}"} - Dir.glob("/dev/xvd*"))[0]
device_id = drive[-1..-1]
kgilpin / gist:3537559
Created Aug 30, 2012
Archive a Jenkins Ruby Gem artifact to a Conjur Dataset
View gist:3537559
cd pkg && INSCITIV_ENV=stage rvm 1.9.2@myproject do bundle exec ../bin/conjur datafile:upload "Jenkins artifacts: myproject" *.gem
kgilpin / executor.rb
Created May 24, 2012
Command execution with realtime feedback
View executor.rb
exit_code = Open3.popen3(env, cmd, opts) do |stdin, stdout, stderr, thread|
# Create a thread to read from each stream
threads = [[:stdout, stdout], [:stderr, stderr]].collect do |method, stream| do
until (line = stream.gets).nil?
callback.send(method, line)
You can’t perform that action at this time.