- knife the server once
- log in with generic ubuntu once
- fix encrypted dbag value
- ensure edbs is at /etc/chef/encrypted_data_bag_secret has the correct key (get from dreamr)
CREATE OR REPLACE FUNCTION GETUTCDATE() RETURNS TIMESTAMP AS ' | |
SELECT CAST(LOCALTIMESTAMP AT TIME ZONE ''UTC'' AS TIMESTAMP); | |
' LANGUAGE SQL VOLATILE; | |
GETUTCDATE(); |
### Git Workflow | |
Answering the following questions helps you choose a branch workflow: | |
* Where do important phases of development occur? | |
* How can you identify (and backport) groups of related change? | |
* Do you have work which often needs to be updated in multiple distinct long-lived branches? | |
* What happens when emergency patches are required? | |
* What should a branch for a particular purpose (including user-tactical) be named? | |
* What is the lifecycle of a branch? |
how do I get from here (app01) | |
(ruby-1.9.3) ~/proj/hvst/infrastructure $ knife node show app01.hvst.com | |
Node Name: app01.hvst.com | |
Environment: _default | |
FQDN: app01.hvst.com | |
IP: 54.218.202.46 | |
Run List: role[base], role[app--rails] | |
Roles: base, internal--shell, internal--logs, internal--security, internal--mailer, internal--monitoring, internal--datadog, internal--system_tools, app--rails, internal--development, internal--image_tools | |
Recipes: base, runit, chef-client, omnibus_updater, chef-client::config, ohai, hvst::route53, tmux, grc, zsh, users::sysadmins, hostname, resolver, ntp, logwatch, logrotate, papertrail-cookbook, openssh, sysctl, iptables, hvst::iptables, sudo, denyhosts, chkrootkit, rkhunter, postfix::sasl_auth, postfix::aliases, datadog::dd-agent, datadog::dd-handler, datadog::network, htop, monit, newrelic-sysmond, sysstat, curl, git, rsync, vim, xml, xslt, zip, build-essential, postgresql::libpq, imagemagick, imagemagick::devel, hvst::ruby, nodejs, hvst::rails, hv |
(ruby-1.9.3) ~/proj/hvst/infrastructure $ knife ec2 server create -r 'role[base], role[app--rails]' -I ami-daac32ea -f m1.medium -G hvst-base -x ubuntu -Z us-west-2b -N app02.hvst.com | |
Instance ID: i-295ba41e | |
Flavor: m1.medium | |
Image: ami-daac32ea | |
Region: us-west-2 | |
Availability Zone: us-west-2b | |
Security Groups: hvst-base | |
Tags: {"Name"=>"app02.hvst.com"} | |
SSH Key: staginghvstcom |
reporter = Reporting::Reporter.new | |
def do_shit | |
reporter.add_msg_line "Starting do shit" | |
rescue Exception => e | |
reporter.add_msg_line "There was an error! #{e.message}" | |
ensure | |
reporter.send_event("do Shit") | |
end |
def calculate_return(last_trade) | |
send(:"calculate_#{recommendation.to_s}_return", last_trade) | |
end |
require 'io/console' | |
# Some vars to give us data | |
dict = %W(ruby lambda functional) | |
game_word = dict[rand(dict.size)] | |
guesses = { | |
correct: [], | |
incorrect: [] | |
} | |
max_guesses = 7 |
I did these private and then realized I would like prospective clients to see this code :)
module Yahtzee | |
module ScoreCardUpdater | |
module_function | |
def update(game_card) | |
->(placement, value) { | |
game_card.update!(placement => value) | |
} | |
end | |
end |