Skip to content

Instantly share code, notes, and snippets.

View gustavonobreza's full-sized avatar
🇧🇷
Studying so hard

Gustavo Alexandre Nobre Mesquita gustavonobreza

🇧🇷
Studying so hard
View GitHub Profile
@gustavonobreza
gustavonobreza / gist:4bbf4d5788f14e063e30201546bfb868
Created July 20, 2024 00:06 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@gustavonobreza
gustavonobreza / battery-is-charging.ps1
Created October 26, 2023 00:41
Laptop is charging in windows with Powershell
Get-WmiObject -Class Win32_Battery | Select-Object -Property BatteryStatus
# 1 - not charging 🔋🔌❌
# 2 - is charging 🔋🔌✅
@gustavonobreza
gustavonobreza / LICENSE.md
Created October 30, 2021 00:37
Open Source license templates

Apache License, Version 2.0

Copyright <YEAR> <OWNER>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0
@gustavonobreza
gustavonobreza / messagebox.go
Created October 29, 2021 15:16 — forked from NaniteFactory/messagebox.go
Win32 API MessageBox() in Golang
import (
"syscall"
"unsafe"
)
// MessageBox of Win32 API.
func MessageBox(hwnd uintptr, caption, title string, flags uint) int {
ret, _, _ := syscall.NewLazyDLL("user32.dll").NewProc("MessageBoxW").Call(
uintptr(hwnd),
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(caption))),
@gustavonobreza
gustavonobreza / nodemon.sh
Created September 7, 2021 03:56
Live reload golang with nodemon
npm install -g nodemon
# Windows
nodemon --exec "go build -o bin.exe . && .\bin.exe" --ignore "*.exe", ".\.git\*" -e go
# Unix based
nodemon --exec "go build -o bin . && ./bin" --ignore "./.git/*" -e go
@gustavonobreza
gustavonobreza / MEMURAI.md
Created September 1, 2021 00:07
How to work with memurai (Redis for Windows)
Memurai official site
# to setup memurai instance:
memurai.exe --service-start

# to stop memurai instance:
memurai.exe --service-stop
@gustavonobreza
gustavonobreza / clear.md
Created August 28, 2021 20:06
How to create a command in bash

I used PowerShell for a long time and got used to typing the "cls" command to clear the console. So I made a script to run anyware and do the same thing now in bash.

cd /usr/bin
touch cls
echo '#!/bin/sh' >> cls
echo 'clear' >> cls
@gustavonobreza
gustavonobreza / ps.ps1
Last active August 21, 2021 22:29
Git pull in all folders in PowerShell
# Enter in folder with many cloned repositories, then run:
Get-ChildItem -Path . -Directory | ForEach-Object { cd $_.Name; git pull; cd ..}
@gustavonobreza
gustavonobreza / upload-supabase.js
Last active August 11, 2021 03:03
Upload many files in supabase storage
// npm i @supabase/supabase-js
const { createClient } = require('@supabase/supabase-js');
const { createReadStream, readdirSync } = require('fs');
// Project id is in URL if you click in storage button, for example: https://app.supabase.io/project/<ID>/storage/buckets
const supabaseUrl = 'https://<PROJECT ID>.supabase.co';
// Read more about keys in https://app.supabase.io/project/<ID>/api/default?page=auth, for this exemple i use service key.
const supabaseKey = process.env.SUPABASE_KEY
const supabase = createClient(supabaseUrl, supabaseKey);
@gustavonobreza
gustavonobreza / Procfile
Created July 30, 2021 05:33
Nest JS Deploy on Heroku
web: npm run start:prod
// Important: User process.env.PORT in the argument of app.listen to works.