Command | Action |
---|---|
git init | Inicia nova linha do tempo |
git branch | Cria nova branch |
git checkout master | Navega entre as branches |
git commit -am "description" | Envia alterações realizadas |
git merge | Une branch ao branch ativo |
git checkout -b | Cria e navega até a nova branch |
This file contains 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
# To export the Visual Studio Code extension list, run | |
code --list-extensions | xargs -L 1 echo code --install-extension | |
# To install, just open or copy and paste to run on terminal | |
code --install-extension adpyke.vscode-sql-formatter && | |
code --install-extension anseki.vscode-color && | |
code --install-extension BeardedBear.beardedicons && | |
code --install-extension BeardedBear.beardedtheme && | |
code --install-extension bradlc.vscode-tailwindcss && | |
code --install-extension ChakrounAnas.turbo-console-log && |
On terminal when init project:
npm init -y
npm i typescript ts-node-dev tsconfig-paths eslint eslint-plugin-simple-import-sort rimraf dotenv-cli -D
npx tsc --init --rootDir ./ --baseUrl ./ --outDir ./dist \
--strictNullChecks false --esModuleInterop --resolveJsonModule \
This file contains 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
// run it on browser console | |
const { nanoid } = await import( | |
'https://cdnjs.cloudflare.com/ajax/libs/nanoid/3.3.2/nanoid.min.js' | |
) | |
const loops = 1_000_000 | |
console.time('NanoID') | |
for (let i = 0; i < loops; i++) { | |
nanoid() |
This file contains 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
#!/bin/sh | |
until docker-compose exec mysql mysql -h 127.0.0.1 -u $DB_USERNAME -p$DB_PASSWORD -D $DB_DATABASE --silent -e "show databases;" | |
do | |
echo "Waiting for database connection..." | |
sleep 5 | |
done |
This file contains 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
{"_type":"export","__export_format":4,"__export_date":"2022-12-16T22:37:08.215Z","__export_source":"insomnia.desktop.app:v2022.6.0","resources":[{"_id":"req_dd6236dd708448aa99d65ecf1cc7d592","parentId":"fld_c6153aa7f6a74750a61083e5ebce7fdd","modified":1671230130609,"created":1669502522217,"url":"{{ _.restBaseUrl }}/users","name":"/users","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1669502522217,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_c6153aa7f6a74750a61083e5ebce7fdd","parentId":"wrk_031bdb6d7c8a40129ab36152ab8ec7c3","modified":1671221337647,"created":1669502518402,"name":"REST","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1671134801469,"_type":"request_group"},{"_id":"wrk_031bdb6d7c8a40129ab36152ab8ec7c3","parentId":null,"modified |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
This file contains 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
export class Email { | |
constructor(private _value: string) { | |
if (!this.isValid()) { | |
throw new Error("Invalid email"); | |
} | |
} | |
private isValid(): boolean { | |
/** | |
* Must have a valid username and domain. |
OlderNewer