This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: true | |
class AdminLogin | |
include Loginable | |
def email | |
'[email protected]' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CompetitiveEater | |
include Comparable | |
def <=>(other) | |
spicy_tolerance <=> other.spicy_tolerance | |
end | |
def initialize(spicy_tolerance) | |
@spicy_tolerance = spicy_tolerance | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Refillable | |
extend ActiveSupport::Concern | |
include do | |
attr_reader :store | |
end | |
def refill! | |
@store = 100 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is what the errors looked like before | |
ActionView::Template::Error: | |
wrong number of arguments (given 2, expected 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /tmp | |
$ git clone https://github.com/matthewrudy/bundler2-heroku-example.git | |
Cloning into 'bundler2-heroku-example'... | |
remote: Enumerating objects: 94, done. | |
remote: Counting objects: 100% (94/94), done. | |
remote: Compressing objects: 100% (74/74), done. | |
remote: Total 94 (delta 5), reused 94 (delta 5), pack-reused 0 | |
Unpacking objects: 100% (94/94), done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.circleci/config.yml b/.circleci/config.yml | |
index 37e192c..d639500 100644 | |
--- a/.circleci/config.yml | |
+++ b/.circleci/config.yml | |
@@ -15,6 +15,7 @@ jobs: | |
ENABLE_REVIEW_APPS: true | |
BASIC_AUTH_USER: user | |
BASIC_AUTH_PASSWORD: password | |
+ BUNDLER_VERSION: 2.0.0 | |
- image: circleci/postgres:11-alpine # 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddTimestampsToRegions < ActiveRecord::Migration[4.2] | |
def up | |
add_timestamps :regions, null: true | |
execute "UPDATE regions SET created_at = NOW(), updated_at = NOW()" | |
change_column_null :regions, :created_at, false | |
change_column_null :regions, :updated_at, false | |
end | |
def down | |
remove_column :regions, :created_at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo 'p { margin: .5em }' > /tmp/in.scss | |
$ sass --style compressed /tmp/in.scss /tmp/out.css | |
$ cat /tmp/out.css | |
p{margin:0.5em} | |
/*# sourceMappingURL=out.css.map */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When I started coding, everything was easy. | |
I went to our scrum board, | |
I took a card, | |
It had acceptance criteria, | |
maybe I had to ask a few questions, | |
but more or less I was left to code in peace. | |
Everything was simple. | |
I could be the 10x engineer everyone talks about. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MultiCounter | |
def initialize(n) | |
@counters = [0]*n | |
end | |
def add(*values) | |
values.each_with_index do |v, i| | |
@counters[i] += v | |
end | |
end |
NewerOlder