$ yarn global add git-branch-select
$ source ~/.zshrc
$ git config --global alias.co branch-select
$ cd /path/to/repo
$ git co
This file contains hidden or 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
# reset the system defaults | |
# xset r rate | |
# output the current InitialKeyRepeat`value | |
defaults read NSGlobalDomain InitialKeyRepeat | |
# output the current KeyRepeat`value | |
defaults read NSGlobalDomain KeyRepeat | |
# disable alternate characters when holding a key |
Lista curada de links de vídeos, podcasts e artigos, que podem ajudar a dar uma introdução básica ao assunto, para quem tiver interesse.
- Dilúvio de dados #nerdologia
- Robôs vão tomar o seu emprego? #nerdologia
- O futuro do seu emprego #nerdologia
- Como Estudar #alura
- Author: Kirk Lampert
- Source: https://stackoverflow.com/a/57513272/1603694
- In VS Code, hold
Command + Shift + P
(for mac) orCtrl + Shift + P
- Type
Preferences: Open Keyboard Shortcuts (JSON)
and press[Enter]
- On
keybindings.json
, paste and adapt if so thevscode_keybindings_surroundings.json
's content
This file contains hidden or 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
getAllErrors(form: FormGroup | FormArray): { [key: string]: any; } | null { | |
let hasError = false | |
const result = Object.keys(form.controls).reduce((acc, key) => { | |
const control = form.get(key) | |
const errors = (control instanceof FormGroup || control instanceof FormArray) | |
? this.getAllErrors(control) | |
: control.errors | |
if (errors) { | |
acc[key] = errors |
This file contains hidden or 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
service cloud.firestore { | |
match /databases/{database}/documents { | |
// USERS // | |
function isAuthenticated() { | |
return request.auth != null; | |
} | |
function userExists(uid) { |
This file contains hidden or 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
const created_by = '12345566'; | |
const script = 'if (ctx._source.raters == null) { ctx._source.raters = [] } \ | |
if (ctx._source.raters.indexOf(params.created_by) == -1) {\ | |
ctx._source.raters.add(params)\ | |
}'; | |
return this.client.update({ | |
index: 'index', | |
type: 'type', | |
id: 'key', | |
body: { |
This file contains hidden or 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
# Load data from mysql to postgres | |
$ pgloader mysql://username:password@localhost/dbname pgsql:///dbname |
This file contains hidden or 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
openssl genrsa -out my-key.pem 2048 | |
openssl rsa -in my-key.pem -pubout > my-key.pub |
This file contains hidden or 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
FROM alpine/git:latest AS git | |
MAINTAINER roalcantara <[email protected]> | |
# Required Environment Variables | |
ARG NG_ENV=prod | |
ARG GIT_REPO | |
ARG GIT_BRANCH=master | |
## Clone the git repository |