start new:
tmux
start new with session name:
tmux new -s myname
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
# Using these pry gems -- copy to your Gemfile | |
# group :development, :test do | |
# gem 'awesome_print' # pretty print ruby objects | |
# gem 'pry' # Console with powerful introspection capabilities | |
# gem 'pry-byebug' # Integrates pry with byebug | |
# gem 'pry-doc' # Provide MRI Core documentation | |
# gem 'pry-rails' # Causes rails console to open pry. `DISABLE_PRY_RAILS=1 rails c` can still open with IRB | |
# gem 'pry-rescue' # Start a pry session whenever something goes wrong. | |
# gem 'pry-theme' # An easy way to customize Pry colors via theme files | |
# end |
// Alerts | |
@include alert-variant($background, $border, $text-color); | |
// Background Variant | |
@include bg-variant($parent, $color); | |
// Border Radius | |
@include border-top-radius($radius); | |
@include border-right-radius($radius); | |
@include border-bottom-radius($radius); |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install postgresql@9.6 | |
brew unlink postgresql@9.6 | |
brew link postgresql |
You already know the value of a niche - you go up in market value the more specialized you are in anything. So what do you specialize in?
There are many schools of thought, including ones where you could be a generalist that doesn't specialize in anything. I find one rule to be simplest and most effective above all: Specialize in the New.
Didn't we just agree to avoid FOMO? Well yes, thats an important distinction - don't specialize in everything new. Specializing means you have to say no to a lot of things. Just pick something new that fascinates you, and hopefully many others as well. Since you're learning in public, you'll know when you hit on a real nerve. Budget in the idea that you'll fail a few times before you find Your Thing.
Then the other big objection: There are plenty of jobs/money/etc in (fill in the blank older technology) too! This is usually followed by some big numbers and anecdata. "My brother's cousin's roommate's friend took this COBOL job and now he's ear
<!doctype html> | |
<html> | |
<head> | |
<style> | |
html, body { | |
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, 'Segoe UI', sans-serif; | |
} | |
.color-grid { | |
display: grid; |
module SqlQueryCountingHelpers | |
# This helper can be used to instrument a segment of test code to analyze the | |
# SQL queries being executed for that portion of the code path. | |
# | |
# It's intended to be used around specific portions of a spec rather than an | |
# entire spec as the FactoryBot usage adds a good amount of noise to the SQL | |
# analysis due to the many objects & associations created. | |
# | |
# Usage example (using spec/requests/api/v1/projects_spec.rb): | |
# |