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
import asyncio | |
import websockets | |
import time | |
SERVER_IP = "192.168.X.X" # IP da máquina que está rodando o servidor | |
PORT = 8765 # Porta do servidor WebSocket | |
URL = f"ws://{SERVER_IP}:{PORT}" | |
async def monitor_websocket(): | |
while True: |
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
INSERT INTO public.banks (id, name, ispb_code, compensation_code, created_at, updated_at) VALUES ('113cd26a-e451-4a86-8fef-e30d353860f3', 'BCO DO BRASIL S.A.', '0', '1', '2023-08-25 12:04:04.798226', null); | |
INSERT INTO public.banks (id, name, ispb_code, compensation_code, created_at, updated_at) VALUES ('2abd0e9c-8a84-406c-8e85-60b9c27ff52d', 'BRB - BCO DE BRASILIA S.A.', '208', '70', '2023-08-25 12:04:04.798226', null); | |
INSERT INTO public.banks (id, name, ispb_code, compensation_code, created_at, updated_at) VALUES ('a67e2928-9a99-4688-b66f-e27a61a0af84', 'SANTINVEST S.A. - CFI', '122327', '539', '2023-08-25 12:04:04.798226', null); | |
INSERT INTO public.banks (id, name, ispb_code, compensation_code, created_at, updated_at) VALUES ('a7c6613f-08b6-4303-8a6a-68f949f8d290', 'CCR SEARA', '204963', '430', '2023-08-25 12:04:04.798226', null); | |
INSERT INTO public.banks (id, name, ispb_code, compensation_code, created_at, updated_at) VALUES ('b7100d66-f3b5-4968-83b3-967f3c0da6fa', 'AGK CC S.A.', '250699', '272', '2023-0 |
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
mkdir -p $HOME/Library/KeyBindings | |
nano $HOME/Library/KeyBindings/DefaultKeyBinding.dict | |
# Put the following content into them | |
# | |
# { | |
# "#." = ("insertText:", ","); | |
# } | |
# |
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/env bash | |
# Install Nodejs | |
curl https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz -O \ | |
&& tar xf node-v8.12.0-linux-x64.tar.xz \ | |
&& cp -R node-v8.12.0-linux-x64/* /usr/local \ | |
&& rm -rf node-v8.12.0-linux-x64 \ | |
&& rm -f node-v8.12.0-linux-x64.tar.xz |
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
namespace :db do | |
namespace :drop do | |
task connections: :environment do | |
begin | |
database = ActiveRecord::Base.connection.current_database | |
ActiveRecord::Base.connection.execute(<<-SQL) | |
SELECT pg_terminate_backend(pg_stat_activity.pid) | |
FROM pg_stat_activity | |
WHERE pg_stat_activity.datname = '#{database}' AND pid <> pg_backend_pid(); | |
SQL |
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
# List the Vagrant config to get ip address and key path | |
$ vagrant ssh-config | |
# Bind port | |
$ sudo ssh -L 0.0.0.0:80:<vagran-ip>:80 -i <path-to-listed-private-key> -p 2222 -N vagrant@localhost |
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
Ao Sindicato __ | |
Assunto: CONTRIBUIÇÃO CONFEDERATIVA/CONTRIBUIÇÃO ASSISTENCIAL | |
Eu ........., portadora da carteira profissional n.º ............, CPF e RG regularmente registrada na empresa (NOME DA EMPRESA e CNPJ) com sede à (ENDEREÇO), Nº , bairro,..........., venho, informar que não concordo com o desconto referente a Contribuição Confederativa / Assistencial que veio a ser determinado pela Convenção Coletiva do Trabalho 20xx/20xx e não autorizo o desconto da mesma em folha de pagamento. | |
Sendo só para o momento, firmo a presente; | |
Assinatura do trabalhador |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"math/rand" | |
"time" | |
) | |
var massas = []string{"fina", "media", "grossa"} |
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
# Add PEM key | |
ssh-add my-key.pem | |
# Open a local tunnel for all interfaces, using port 6352 | |
ssh -D 0.0.0.0:6352 -f -C -q -N [email protected] |
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/env bash | |
# Reference: https://ask.fedoraproject.org/en/question/9111/sticky-what-plugins-do-i-need-to-install-to-watch-movies-and-listen-to-music/ | |
# | |
# Set up the repositories | |
# | |
sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm | |
# | |
# Install minimal |
NewerOlder