Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Doherty randomcamel

  • Looking For The Next Thing
  • Home
View GitHub Profile
@randomcamel
randomcamel / estimating.md
Created Jun 4, 2020
Chris's Software Estimation
View estimating.md
  1. know how much roadmap-project work people can do in a week. commonly it's 40-60% of their time. call that PR (for Project Ratio).

  2. make a spreadsheet: [Story, Description, People, Weeks, Person-Weeks].

  3. break the work down into comprehensible pieces, where you feel confident saying things like "this will take 2 people, working full-time, 3 weeks to implement." in particular, break down milestones that deliver value; where, if the business told you to do something else, that would be okay, and the work done wasn't wasted.

  4. fill in your spreadsheet columns appropriately (say 2 people, 3 weeks, 6 Person-Weeks).

  5. sum up the Person-Weeks. ("People" and "Weeks" are for later.)

View response.md

This is a bit of history and a bit of a quirk in timing...

The history first...

Vagrant has all manner of provisioners effectively supporting any CM tool as well as supporting plugins to add more. When I started on Packer, I basically copied this model (nit: provisioners aren't pluggable anymore cause no one ever used that functionality but the interfaces are very similar and Packer also supports all manner of CM tool).

View Vault docs to PDF.sh
# Install prereqs with Homebrew:
#
# uninstall moreutils if installed:
# `brew uninstall moreutils`
#
# brew install wget
# brew install poppler
# brew install parallel
# brew install moreutils --without-parallel
set -e
View grargh.rb
# this creates an instance of the ::Ipaddr Chef resource, named "192.168.1.1"
ipaddr "192.168.1.1"
heartbeat "yeargh" do
<stuff>
# I *think* the "heartbeat" resource will take this and try to find a resource with that name.
resource_groups ["192.168.1.1"]
end
View gist:2230f591a4ffe1cef7bf
mkdir: /Users/cdoherty/repos/chef-dummy/chef-provisioning-fake-generated: File exists
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* directory[lib/chef/provisioning/driver_init] action create (up to date)
* directory[lib/chef/provisioning/fake-generated_driver] action create (up to date)
* file[lib/chef/provisioning/fake-generated_driver.rb] action create (up to date)
* file[lib/chef/provisioning/fake-generated_driver/version.rb] action create (up to date)
* file[lib/chef/provisioning/fake-generated_driver/driver.rb] action create (up to date)
* execute[rspec --init && echo '-fd' >> .rspec] action run (skipped due to not_if)
* file[spec/fake-generated_spec.rb] action create (up to date)
@randomcamel
randomcamel / .vagrant.d-Vagrantfile
Created Mar 31, 2015
Configure Vagrant to use Polipo on the OS X host as an HTTP(S) caching proxy
View .vagrant.d-Vagrantfile
# this saves us from both hard-coding an IP, and using a non-bridged IP for the VM.
iface = `ifconfig -l`.match(/(vbox|vmnet.*?) /)[1]
local_ip = `ifconfig #{iface}`.match(/inet (.*?) /)[1]
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
if `lsof -i |egrep -e '^polipo.*TCP \\*:8123.*LISTEN'`.to_s.empty?
$stderr.puts "lsof doesn't see polipo listening on *:8123; running without a proxy."
elsif local_ip
config.proxy.http = "http://#{local_ip}:8123/"
@randomcamel
randomcamel / hanging_env
Last active Aug 29, 2015
/usr/bin/env called from shebang hangs with an invocation that works from the command line.
View hanging_env
root@server-12-ubuntu-1404:~# /usr/bin/env PATH=/opt/chef-server/embedded/bin ruby -e 'puts ENV["PATH"]'
/opt/chef-server/embedded/bin
root@server-12-ubuntu-1404:~# cat foo.rb
#!/usr/bin/env PATH=/opt/chef-server/embedded/bin ruby
puts ENV["PATH"]
root@server-12-ubuntu-1404:~# ./foo.rb
^C
root@server-12-ubuntu-1404:~#
View gist:f13d1751af51aa606a33

"The reader finds themselves wondering, "does send_data handle an empty array correctly?", and squanders precious seconds scrolling down the page to look. Despite the relief at discovering that of course it does, those seconds--entire, complete, juicy seconds in which the reader might instead be sucking out all the marrow of life, as Mr. Thoreau would no doubt have said when faced with a similar situation--could, at the programmer's discretion, be saved by guarding this call with a kind, if strictly unnecessary, unless."

@randomcamel
randomcamel / gist:b10f1db445eb842931de
Created Mar 11, 2015
pg gem build failure with Chef 12.1.1
View gist:b10f1db445eb842931de
find_executable: checking for pg_config... -------------------- yes
--------------------
find_header: checking for libpq-fe.h... -------------------- yes
"gcc -o conftest -I/opt/chef/embedded/include/ruby-2.1.0/x86_64-linux -I/opt/chef/embedded/include/ruby-2.1.0/ruby/backward -I/opt/chef/embedded/include/ruby-2.1.0 -I. -I/usr/include/postgresql -I/opt/chef/embedded/include -O3 -g -pipe -I/opt/chef/embedded/include -I/opt/chef/embedded/include -O3 -g -pipe -fPIC conftest.c -L. -L/opt/chef/embedded/lib -Wl,-R/opt/chef/embedded/lib -L/usr/lib -Wl,-R/usr/lib -L/opt/chef/embedded/lib -Wl,-R/opt/chef/embedded/lib -L. -Wl,-rpath,/opt/chef/embedded/lib -fstack-protector -L/opt/chef/embedded/lib -rdynamic -Wl,-export-dynamic -L/opt/chef/embedded/lib -Wl,-R/opt/chef/embedded/lib -Wl,-R -Wl,/opt/chef/embedded/lib -L/opt/chef/embedded/lib -lruby -lpthread -lrt -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
View gist:06e5e8b9a36482b44d99
PS C:\Users\Chris Doherty\chef> bundle exec chef-client -z -r 'recipe[dsc-test]'
DL is deprecated, please use Fiddle
[2014-12-15T20:08:26-08:00] WARN: No config file found or specified on command line, using command line options.
Starting Chef Client, version 12.1.0.dev.0
resolving cookbooks for run list: ["dsc-test"]
Synchronizing Cookbooks:
- dsc-test
Compiling Cookbooks...
Converging 1 resources
Recipe: dsc-test::default