Skip to content

Instantly share code, notes, and snippets.

View lucasmoreiradev's full-sized avatar
🎯
Focusing

Lucas Moreira lucasmoreiradev

🎯
Focusing
View GitHub Profile
bindsym --release $mod+F11 exec "xdotool key F11; i3-msg fullscreen disable"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
position top
}
#interactive screenshot by pressing printscreen
@jozefcipa
jozefcipa / json-processor.js
Last active April 15, 2023 01:52
Process large JSON files with streams
import fs from 'fs'
import { Transform } from 'stream'
import JSONStream from 'JSONStream'
// Custom transform stream
const transformer = new Transform({
objectMode: true,
transform(jsonItem, encoding, callback) {
// your logic goes here...
// const updatedItem = {}
@diego3g
diego3g / settings.json
Last active July 8, 2024 02:10
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 15,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
@checco
checco / rw_ro_access.sql
Last active March 22, 2024 08:32 — forked from oinopion/read-access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- Read only
--
-- Create a group
CREATE ROLE postgres_ro_group;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO postgres_ro_group;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group;
@VictorTaelin
VictorTaelin / promises.md
Last active July 3, 2024 14:03
promises de novo

(edit: clique aqui para um fork desse texto melhor editado, feito pelo Kewerson Hugo; não vou mexer no original pq deu resultado, e eu gostaria de observar se isso pode ser parcialmente atribuido ao seu estilo)

o pq de funcões assíncronas

funcoes de javascript quase sempre são assincronas. isso acontece porque js lida muito com coisas como http requests, leitura de disco... operacoes que levam muito tempo. imagina se seu programa travasse toda vez que vc fizesse um request http? pra evitar isso, o request é feito em background, o programa continua rodando, e depois o resultado é enviado pra vc num callback

request("www.google.com", function callback(resultado) { ... })
@chrisjm
chrisjm / README.md
Last active December 8, 2023 04:00 — forked from tache/README-SSL-Certificates.md
LetsEncrypt, AWS Certificate Manager, and CloudFront

Using LetsEncrypt SSL certificates with AWS Certificate Manager and CloudFront

This is a document for managing LetsEncrypt certificates on AWS using AWS Certificate Manager and configuring on CloudFront using the AWS CLI.

Setup

Follow the instructions to set up the certbot and aws commands on your local machine:

@AloofBuddha
AloofBuddha / associations.md
Last active February 27, 2024 08:25
Sequelize Relationships: hasOne vs belongsTo
""
"" Janus setup
""
" Define paths
let g:janus_path = escape(fnamemodify(resolve(expand("<sfile>:p")), ":h"), ' ')
let g:janus_vim_path = escape(fnamemodify(resolve(expand("<sfile>:p" . "vim")), ":h"), ' ')
let g:janus_custom_path = expand("~/.janus")
" Source janus's core
@suissa
suissa / remodelagem-para-mongodb.md
Last active June 21, 2020 19:58
Um aluno do Be MEAN postou essa modelagem relacional a qual ele estava com dificuldades para passar para o MongoDB, então vou ensinar aqui como faz

Remodelagem do Relacional para o MongoDb

Um aluno do Be MEAN postou essa modelagem relacional a qual ele estava com dificuldades para passar para o MongoDB, então vou ensinar aqui como faz

Vamos inicialmente separar pelas COLEÇÕES que achamos que devemos ter:

  • Usuario;
  • Escola;
@rcaneppele
rcaneppele / comandos.sh
Last active November 18, 2015 00:23
Comandos JVM GC
# Parallel
time java -verbose:gc -XX:+UseParallelOldGC EstressaGC
# CMS:
time java -verbose:gc -XX:+UseConcMarkSweepGC EstressaGC
# G1:
time java -verbose:gc -XX:+UseG1GC EstressaGC