Logo

TODAY I LEARNED

B5efe5f714c20ec37123259a508351eb

5 posts by Eduardo Gutiérrez
@eduardo_gtzp

use bundle open gemname

You can take a peek at a locally installed gem's code very easily in ruby mine.
If you are using another IDE it would require a few extra steps:
First, set BUNDLER_EDITOR in ~/.bashrc or ~/.zshrc (or whatever shell you are using)
export BUNDLER_EDITOR="code"
(code to use VS code)
Then, simply run $ bundle open gemname and voilá! Look at whatever gem you want

Learned by Eduardo Gutiérrez on Apr 6, 2021

973983 adforcodereview v3 0211021 c02 021121

Make your docker images safer!

Use docker scan <your image> to detect vulnerabilities easily! (JUst patch them after!)

Learned by Eduardo Gutiérrez on Mar 1, 2021

973983 adforcodereview v3 0211021 c02 021121

Create a Pull Request from the CLI

In 2020 GitHub launched its CLI.
Among many other wonders, it allows you to create a PR from the command line.
Using it is exceedingly easy!

First, install it
$ brew install gh
Then, authenticate
$ gh auth login
Finally, create a PR with
$ gh pr create
If your repo has a PR template, it will make use of it.

Learned by Eduardo Gutiérrez on Feb 23, 2021

973983 adforcodereview v3 0211021 c02 021121

Test your CircleCi build locally

The CircleCI CLI allows you to locally validate your config.yml and run some or all non-parallelized jobs locally:
To Validate the config:
$ circleci config validate
To Run a job:
$ circleci local execute --job JOB_NAME
To Run the workflow:
circleci local execute
To know more visit the CircleCi Docs

Learned by Eduardo Gutiérrez on Feb 23, 2021

973983 adforcodereview v3 0211021 c02 021121

Export defualt const is invalid because...

const is a lexical declaration

default expects a HoistableDeclaration, ClassDeclaration or AssignmentExpression

and thus, export default const someVariable is a SynthaxError

Learned by Eduardo Gutiérrez on Feb 21, 2021

973983 adforcodereview v3 0211021 c02 021121