Skip to content

Instantly share code, notes, and snippets.

View MRLSK8's full-sized avatar
💻
^_^

Marcelo Lima MRLSK8

💻
^_^
View GitHub Profile
@MRLSK8
MRLSK8 / ssh key
Last active March 8, 2022 22:56
handling ssh key
generating the key:
ssh-keygen -t rsa
or
ssh-keygen -t ed25519 -C "your_email@example.com"
printing the key:
cat ~/.ssh/id_rsa.pub
or
@MRLSK8
MRLSK8 / currencyFormatter.ts
Last active October 4, 2021 20:47
currencyFormatter
const currencyFormatter = (value?: number) => {
if (typeof value !== 'number') return 'R$';
return 'R$ ' + value.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d{3})+\,)/g, '$1.');
}
@MRLSK8
MRLSK8 / Git aliases
Last active May 8, 2021 01:07
Making your life easier while using git.
[user]
name = Marcelo Lima
email = jmdl.k8@gmail.com
[alias]
# add command shorthanded
a = add
# commit a change on stage
ci = commit -m
# show status prettier
{"version":1,"resource":"file:///Users/jose.lima/Documents/GitProjects/assai-clientes-app/src/screens/Discounts/hooks/useDiscountCategories.ts","entries":[{"id":"dO0X.ts","timestamp":1660919633302},{"id":"DetH.ts","timestamp":1660919660286},{"id":"69EY.ts","timestamp":1660919687808},{"id":"aYA9.ts","source":"Workspace Edit","timestamp":1660919696568},{"id":"NCN8.ts","timestamp":1660919715288},{"id":"ymFE.ts","timestamp":1660919746230},{"id":"lO7G.ts","timestamp":1660919782540},{"id":"RGBN.ts","timestamp":1660920033092},{"id":"6Z9D.ts","timestamp":1660922946676},{"id":"5A3t.ts","source":"undoRedo.source","timestamp":1660922981679},{"id":"gEfE.ts","timestamp":1660923006166},{"id":"o3ms.ts","source":"moved.source","timestamp":1660924207146},{"id":"25Ik.ts","timestamp":1660930883660},{"id":"7HHa.ts","timestamp":1660936424713},{"id":"UP5N.ts","timestamp":1661282767528},{"id":"G4bJ.ts","timestamp":1663771861836},{"id":"741k.ts","timestamp":1663771899634},{"id":"RA8O.ts","timestamp":1663771913029},{"id":"9kGe.ts","t