-
entrar no prompt postgres:
sudo -u postgres psql postgres
-
sair das coisa:
\q
-
criar senha para usuario:
\password user
-
mostrar bancos:
\l
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
#!/usr/bin/bash | |
echo "🐺 Digite o nome do perfil do vscode: " | |
read profileName | |
profile="" | |
if [ $profileName != "" ]; then | |
profile="--profile $profileName" | |
fi | |
code --install-extension Angular.ng-template $profile && |
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
/* Express Route Adapter */ | |
const resolver = (handlerFn) => { | |
return (req, res, next) => { | |
return Promise.resolve(handlerFn(req, res, next)) | |
.catch(e => next(e)); | |
} | |
} | |
/* Errors */ | |
class InternalServerError extends Error { |
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
Segue a lista de comandos docker e sua utilidade: | |
docker attach – Acessar dentro do container e trabalhar a partir dele. | |
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem. | |
docker commit – Cria uma imagem a partir de um container. | |
docker cp – Copia arquivos ou diretórios do container para o host. | |
docker create – Cria um novo container. | |
docker diff – Exibe as alterações feitas no filesystem do container. | |
docker events – Exibe os eventos do container em tempo real. | |
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele. |
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
# https://learn.microsoft.com/pt-br/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell | |
# pre-requisitos | |
# Um dispositivo que executa pelo menos o Windows Server 2019 ou Windows 10 (build 1809). | |
# PowerShell 5.1 ou posterior. | |
# Uma conta que é membro do grupo de administradores internos. | |
# saber se usuario e adm | |
(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) True # saber se o Openssh ta instalado | |
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH' |
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": { | |
"client_type": "CONFIDENTIAL", | |
"authority_type": "SINGLE_TENANT", | |
"framework": "DJANGO" | |
}, | |
"client":{ | |
"client_id": "{enter your client id}", | |
"client_credential": "{enter your client credential}", | |
"authority": "https://login.microsoftonline.com/{enter your tenant id}", |
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
# Author: Zameer Ansari | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
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
gunicorn --worker-tmp-dir /dev/shm application.wsgi |
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
{"name":"JSdev","settings":"{\"settings\":\"{\\r\\n \\\"workbench.iconTheme\\\": \\\"material-icon-theme\\\",\\r\\n \\\"workbench.startupEditor\\\": \\\"none\\\",\\r\\n \\\"workbench.colorTheme\\\": \\\"Panda Syntax\\\",\\r\\n \\\"terminal.integrated.defaultProfile.windows\\\": \\\"PowerShell\\\", // estabelescendo git bash terminal padrao\\r\\n \\\"editor.formatOnSave\\\": true,\\r\\n \\\"diffEditor.ignoreTrimWhitespace\\\": false,\\r\\n \\\"powermode.enabled\\\": true,\\r\\n \\\"powermode.combo.location\\\": \\\"off\\\",\\r\\n \\\"powermode.shake.enabled\\\": false,\\r\\n \\\"[javascript]\\\": {\\r\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\"\\r\\n },\\r\\n \\\"terminal.integrated.cursorStyle\\\": \\\"underline\\\",\\r\\n \\\"terminal.integrated.customGlyphs\\\": false,\\r\\n \\\"[python]\\\": {\\r\\n \\\"editor.formatOnType\\\": true\\r\\n }\\r\\n}\\r\\n\"}","tasks":"{\"tasks\":\"{}\"}","extensions":"[{\"identifier\":{\"id\":\"2gua.rainbow-brackets\",\"uuid\":\"79 |
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
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser |
NewerOlder