"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
."
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:~# |
# 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/" |
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) |
# 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 |
# 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 |
This is a bit of history and a bit of a quirk in timing...
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).
-
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).
-
make a spreadsheet: [Story, Description, People, Weeks, Person-Weeks].
-
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.
-
fill in your spreadsheet columns appropriately (say 2 people, 3 weeks, 6 Person-Weeks).
-
sum up the Person-Weeks. ("People" and "Weeks" are for later.)
#!/bin/sh | |
# uses rsync's hard-link feature to mimic the function and structure of Apple's Time Machine. | |
# my server's name is 'shiny', which I evidently used to mount on /backup. | |
TARGET=/backup/shiny | |
date=`date "+%Y-%m-%dT%H:%M:%S"` | |
rsync --exclude=.AppleDouble -aCPv --link-dest=$TARGET/current $HOME $TARGET/back-$date | |
cd $TARGET |
brew () { | |
if [[ "x$1" == "xcask" && "x$2" == "xsearch" ]]; then | |
echo '`brew cask search` is broken, translating for you...' | |
shift | |
/usr/local/bin/brew $* | |
else | |
/usr/local/bin/brew $* | |
fi | |
} |