Skip to content

Instantly share code, notes, and snippets.

View gmdias727's full-sized avatar

Gabriel Mazieri gmdias727

  • Axxispay
  • Brazil
  • 02:56 (UTC -03:00)
View GitHub Profile
vim.cmd("set expandtab")
vim.cmd("set tabstop=4")
vim.cmd("set softtabstop=4")
vim.cmd("set shiftwidth=4")
vim.cmd("set number")
vim.g.mapleader = " "
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
@gmdias727
gmdias727 / .bashrc
Created November 30, 2024 23:06
Add this to your .bashrc if you want a toggle function to switch between US and ABNT-2 keyboard layouts on linux.
function toggle_layout {
currentLayout=$(setxkbmap -query | grep layout | awk '{print $2}')
if [ "$currentLayout" == "br" ]; then
setxkbmap us && notify-send -t 1000 "Switched to US Layout"
else
setxkbmap br && notify-send -t 1000 "Switched to ABNT-2 Layout"
fi
}
@gmdias727
gmdias727 / i3status.conf
Created November 30, 2024 19:32
my personal i3 status bar configuration (November 30 2024)
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@gmdias727
gmdias727 / config
Last active November 30, 2024 23:04
i3wm config file (November 30 2024)
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@gmdias727
gmdias727 / seed_drizzle_zod_faker.ts
Created November 7, 2024 03:40 — forked from ironheart122/seed_drizzle_zod_faker.ts
TS Seed Script: Drizzle ORM + Zod + Faker (Minimal)
// tsx seed.ts
import { faker } from '@faker-js/faker';
import { pgTable, text, varchar, timestamp } from 'drizzle-orm/pg-core';
import { drizzle, PostgresJsDatabase } from 'drizzle-orm/postgres-js';
import { createInsertSchema } from 'drizzle-zod';
import { customAlphabet } from 'nanoid';
import postgres from 'postgres';
import { z } from 'zod';
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"outline_panel": {
@gmdias727
gmdias727 / index.js
Created August 26, 2024 15:00
GET ALL CARDS FROM TRELLO BOARD
import fetch from 'node-fetch';
import fs from "fs";
import { formatDate } from "date-fns"
// provide the following
const key = ""
const token = ""
const boardId = ""
fetch(`https://api.trello.com/1/boards/${boardId}/cards?key=${key}&token=${token}`, {
################################################################################################################################################################################
projeto lol voice chat
utilizar para pensar: https://gist.github.com/EduardoRFS/17f3409a22c1ca5eedc8a9673833424a
1. descobrir como encontrar jogadores com partidas em andamento utilizando a api da riot games
2. descobrir como diferenciar jogadores do time azul e time vermelho utilizando a api da riot games
3. integrar essa descoberta em um bot de discord
4. bot gera 2 canais de voz no discord [red, blue] com um identificador de partida.
5. jogadores interessados em canal de voz precisam estar no servidor do discord

curl

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

wget

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Profile of a great golang developer:

  • Golang fluency and 1+ language (Python, TS/JS, C/C++, Java, Node.js)
  • Kubernetes
  • Microservices
  • Protobuf
  • Strong networking knowledge DNS.
  • Know everything from concept to deployment
  • Write technical documentation

Tests: