Create dump:
docker exec -i CONTAINER_NAME /bin/bash -c "PGPASSWORD=DATABASE_PASSWORD pg_dump --username DATABASE_USER -h RDS_HOST DATABASE_NAME" > ./dump.sql
Create local db to restore dump:
create database "db-restored"
Download do SmartClient: | |
https://suporte.totvs.com/portal/p/10098/download#all/all/all/search/smartclient | |
* Baixar versão: SMARTCLIENT VERSÃO 12 LINUX BUILD 13.2.3.38 | |
Executar os seguintes passos (terminal): | |
mkdir /totvs | |
chmod 777 /totvs | |
cd /totvs |
{ | |
"diffEditor.ignoreTrimWhitespace": false, | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": "explicit" | |
}, | |
"editor.codeLens": true, | |
"editor.columnSelection": false, | |
"editor.detectIndentation": false, |
- Instalação docker: | |
curl -fsSL get.docker.com -o get-docker.sh | |
sh get-docker.sh | |
- Instalação docker-compose (Verificar nas referencias ultima versão¹): | |
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
- Instalação ctop (Opcional - Verificar nas referencias ultima versão²) | |
sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.1/ctop-0.7.1-linux-amd64 -O /usr/local/bin/ctop | |
sudo chmod +x /usr/local/bin/ctop |
const arrA = [1, 3, 4, 5]; | |
const arrB = [1, 2, 5, 6, 7]; | |
const intersection = arrA.filter((x) => arrB.includes(x)); | |
console.log('intersection', intersection); | |
// Output => intersection [ 1, 5 ] | |
const differenceA = arrA.filter((x) => !arrB.includes(x)); | |
console.log('differenceA', differenceA); | |
// Output => difference [ 3, 4 ] |
// Execute: node spread-destructuring-rest-operator.js | |
// #### Spread Operator #### | |
const e1 = 'CODE'; | |
const r1 = [...e1]; | |
console.log('[01]', r1) | |
// Output => [ 'C', 'O', 'D', 'E' ] | |
const e2 = ['This', 'is', 'a', 'sentence']; | |
console.log('[02]', ...e2); |
"use strict"; | |
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', | |
// default font size in pixels for all tabs |
Create dump:
docker exec -i CONTAINER_NAME /bin/bash -c "PGPASSWORD=DATABASE_PASSWORD pg_dump --username DATABASE_USER -h RDS_HOST DATABASE_NAME" > ./dump.sql
Create local db to restore dump:
create database "db-restored"
Pega esse desafio: | |
Faça a soma de todos os produtos de todas as compras sem usar laços (loops - for, foreach, etc). | |
Use apenas map, reduce, recursão, etc. | |
const data = { | |
compras: [ | |
{ | |
data: '2022-01-01', | |
produtos: [ |
[global_config] | |
title_font = Ubuntu 9 | |
title_receive_bg_color = "#8be9fd" | |
title_transmit_bg_color = "#ff5555" | |
[keybindings] | |
split_horiz = <Primary><Alt>e | |
[layouts] | |
[[default]] | |
[[[child1]]] | |
parent = window0 |
#!/bin/env zsh | |
team_total=$(git shortlog -s -n |sed 's/\t/,/g'|cut -f1 -d, |bc -l|awk '{sum+=$1}END{print sum}'); | |
tmp_counter='/tmp/counter.txt'; | |
tmp_user='/tmp/users.txt'; | |
tmp_percentage='/tmp/counters_users' | |
# if you are running this again it make the file empty or you can rm it | |
rm $tmp_percentage $tmp_user $tmp_counter | |
git shortlog -s -n |sed 's/\t/,/g'|cut -f2 -d, >>$tmp_user; | |
git shortlog -s -n |sed 's/\t/,/g'|cut -f1 -d, >>$tmp_counter; |