Skip to content

Instantly share code, notes, and snippets.

View jhonata-menezes's full-sized avatar
🏠
Working ...

Jhonata Menezes jhonata-menezes

🏠
Working ...
View GitHub Profile
@jhonata-menezes
jhonata-menezes / install.sh
Created March 22, 2023 02:27
install docker on a new DO/OVH instance
sudo apt update
sudo apt upgrade -y
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
@jhonata-menezes
jhonata-menezes / requestLogger.server.js
Last active February 23, 2023 21:17
Log in the server side path, status code and response time in a nuxt 3 application, create this file inside the "plugins" folder
export default defineNuxtPlugin(nuxtApp => {
addRouteMiddleware('request-logger', () => {
const start = new Date();
nuxtApp.hook('app:rendered', (renderContext) => {
const { req, res } = (renderContext.ssrContext.event.node)
res.on('close', () => {
const message = `${res.statusCode} ${req.url} ${new Date() - start} ms`
console.info(message)
})
})
@jhonata-menezes
jhonata-menezes / gamemode_casual.cfg
Last active May 3, 2021 22:05
Configurações csgo casual
bot_autodifficulty_threshold_high 0.0 // Value between -20.0 and 20.0 (Amount above avg human contribution score, above which a bot should lower its difficulty)
bot_autodifficulty_threshold_low -2.0 // Value between -20.0 and 20.0 (Amount below avg human contribution score, below which a bot should raise its difficulty)
bot_chatter normal
bot_defer_to_human_goals 0
bot_defer_to_human_items 1
bot_difficulty 1
bot_quota 10
bot_quota_mode fill
cash_player_bomb_defused 200
cash_player_bomb_planted 200
@jhonata-menezes
jhonata-menezes / avenidas-guarulhos.txt
Created July 7, 2020 01:20
avenidas de guarulhos
AV SALGADO FILHO
AV GUARULHOS
AV PAPA JOAO PAULO I
AV BRIGADEIRO FARIA LIMA
AV DOUTOR TIMOTEO PENTEADO
AV MONTEIRO LOBATO
AV OTAVIO BRAGA DE MESQUITA
AV EMILIO RIBAS
AV TIRADENTES
AV PRESIDENTE HUMBERTO DE ALENCAR CASTELO BRANCO
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
openapi: 3.0.0
info:
title: DICT API
version: 1.0.0-RC2
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0'
contact:
name: Suporte TI BCB
email: suporte.ti@bcb.gov.br
@jhonata-menezes
jhonata-menezes / monitoror-config-example.json
Created April 24, 2020 13:19
Exemplo de configuração do monitoror
{
"version": "1.0",
"columns": 2,
"tiles": [
{
"type": "PING",
"label": "Ping Vivareal",
"params": {
"hostname": "www.vivareal.com.br"
}
@jhonata-menezes
jhonata-menezes / s3_acl.py
Last active April 16, 2020 21:23
Lista e Remove acl publico de buckets da AWS
import boto3
import requests
# docs - https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.BucketAcl.put
def s3_remove_acl_public(bucket_name: str):
bucket_acl = s3_acl(bucket_name)
bucket_acl.put(
ACL='private',
)
return bucket_acl
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.