Como ver quais pacotes estão instalados globalmente na sua máquina e quais suas versões.
$ npm list -g --depth=0
# Aliases | |
alias g='git' | |
compdef g=git | |
alias gst='git status' | |
compdef _git gst=git-status | |
alias gl='git pull' | |
compdef _git gl=git-pull | |
alias gup='git fetch && git rebase' | |
compdef _git gup=git-fetch | |
alias gp='git push' |
// source: http://stackoverflow.com/a/11058858 | |
function ab2str(buf) { | |
return String.fromCharCode.apply(null, new Uint16Array(buf)); | |
} |
// Import Suspense and lazy from React | |
import React, { Component, Suspense, lazy } from 'react' | |
import axios from 'axios' | |
import styled from 'styled-components' | |
import { Container, Row, Col } from 'react-grid-system' | |
import { SearchBar } from './components/SearchBar' | |
import { SearchInput } from './components/SearchInput' | |
// Dynamically import the file |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export ANDROID_HOME=~/Android/Sdk | |
export PATH="$PATH:$ANDROID_HOME/tools" | |
export PATH="$PATH:$ANDROID_HOME/platform-tools" | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/diegofernandes/.oh-my-zsh" | |
export PATH="$PATH:/usr/local/bin" |
Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
[alias] | |
ci = commit | |
co = checkout | |
cm = checkout master | |
cb = checkout -b | |
st = status -sb | |
sf = show --name-only | |
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
Referências da semana de pré-work do Bootcamp em React.js
A semana de pré-work acontecerá nos dias 16/08/2021 à 20/08/2021 na Twitch do Daciuk.
Nessa semana, as lives acontecerão excepcionalmente à partir das 15h. Todas as informações sobre o Bootcamp você encontra em: https://b-academy.brainn.co/
const minute = 60; | |
const hour = minute * 60; | |
const day = hour * 24; | |
const week = day * 7; | |
const month = day * 30; | |
const year = day * 365; | |
/** | |
* Convert a date to a relative time string, such as | |
* "a minute ago", "in 2 hours", "yesterday", "3 months ago", etc. |
import { useEffect } from 'react'; | |
import { KeyboardKey } from 'enums/keyboardKey'; | |
export const useKeyPress = (callback: (T?: any) => void, keys: KeyboardKey[]) => { | |
const onKeyDown = (event: KeyboardEvent) => { | |
const wasAnyKeyPressed = keys.some((key) => event.key === key); | |
if (wasAnyKeyPressed) { | |
event.preventDefault(); | |
callback(); |