It goes a little something like this:
rails new APP_NAME --database=postgresql --skip-test-unit
suspenders APP_NAME --skip-git true --skip-keeps true --force
Then comes a whole bunch of customizing for my likes:
- unicorn -> puma
# Back story: I uploaded a dozen or so HD (1080p) movies to my Synology while across the country. | |
# Now I want to make sure the uploads all came through without corruption. | |
for video in *.mp4; do | |
cmp "./${video}" "/Volumes/video/Movies/${video}" | |
done |
# log the default values: | |
echo "speed_limit_max: `cat /proc/sys/dev/raid/speed_limit_max`" #=> 200000 | |
echo "speed_limit_min: `cat /proc/sys/dev/raid/speed_limit_min`" #=> 10000 | |
echo "stripe_cache_size: `/sys/block/md2/md/stripe_cache_size`" #=> 256 | |
# update to use more RAM (Stripe Cache Size) and higher lower bound (speed_limit_min) | |
echo 100000 > /proc/sys/dev/raid/speed_limit_min | |
# This will result in more memory usage. bumping to 32768 resulted in ~512MB RAM increase. | |
echo 32768 > /sys/block/md2/md/stripe_cache_size |
☺ $ dig rustbyexample.com +nostats +nocomments +nocmd | |
; <<>> DiG 9.8.3-P1 <<>> rustbyexample.com +nostats +nocomments +nocmd | |
;; global options: +cmd | |
;rustbyexample.com. IN A | |
rustbyexample.com. 3142 IN A 103.245.222.133 |
TL;DR: I would be great to get some soft of multi-account (or really, multi-email) support.
I have a personal account that I've used for personal and work in the past. But we (work) are now requiring only our company email addresses w/in our Heroku org to make auditing easier, and make accidentally inviting the wrong folks harder. This means I have to have two different accounts, but don't have a useful way to switch between them on either the CLI nor web dashboard. @ddollar's heroku-accounts
is now officially not recommended, and intentionally broken when 2FA is enabled (heroku/heroku-two-factor#13). Painful!
I'd really like to be able to associate multiple email addresses with my account, a la GitHub.
Thanks.
class Nerd < ActiveRecord::Base | |
belongs_to :team, inverse_of: :nerds | |
def team | |
super || NullTeam.new | |
end | |
end |
#!/bin/sh | |
brew_install_if_needed() { | |
package=$1 | |
brew info $package | grep "Not installed" > /dev/null 2>&1 | |
if [[ "$?" -eq "0" ]]; then | |
brew install $package | |
fi | |
} |
module Constraint | |
class Staff | |
def matches?(request) | |
warden(request).authenticated? && | |
warden(request).user.staff? | |
end | |
private |
I hereby claim:
To claim this, I am signing this object:
# via @avdi's RubyTapas Episode 170: http://www.rubytapas.com/episodes/170-Hash-Merge | |
headers = <<END | |
Accept: */* | |
Set-Cookie: foo=42 | |
Set-Cookie: bar=23 | |
END | |
def parse_headers(headers) | |
headers.lines.reduce({}) { |result, line| |