TIL, 2018-03-30, deploying Writing Prompts app.
Musings, Dev env:
- Vim:
zm
to open cold fold,zr
to close. - Only add the files that were added before (useful for re-adding files after Rubocop does its thing.)
function gada {
git diff --name-only --cached | xargs git add
}
Musings, React
- React router tutorial:
- The router is split between
react-router-dom
andreact-router-native
. - The router doesn’t care if the URL is correct, it just changes the URL.
- The router is split between
- Deploying via react-github-pages.
- Issue with CNAME.
- Chat with Aaron :
next.js
is a thing?
Musings, Ruby
- I like this, though if this was Elixir, it would just be a pattern match.
- A
proc { self }
to return everything re: Enumerable.
def duration_for(tag_name = nil)
block = if tag_name
proc { select { |p| p.contains_tag?(tag_name) } }
else
proc { self }
end
block
.call
.sum(&:duration)
end
- Anonymous functions in Ruby!
Integer.instance_methods(false)
to just show the methods defined inInteger
.