Skip to content

Instantly share code, notes, and snippets.

View lira's full-sized avatar
🐢
Working from home

Fernando Lira lira

🐢
Working from home
View GitHub Profile
@itxtoledo
itxtoledo / wg-easy-setup-oracle-vm.sh
Last active July 14, 2025 02:18
Optimized script to install wg-easy on Oracle Linux (Oracle Cloud) in a VPS with 1 GB of RAM
#!/bin/bash
# Check if running as root
if [[ $EUID -ne 0 ]]; then
echo "Error: This script must be run as root. Use sudo."
exit 1
fi
# Initial settings
set -euo pipefail
@bashbunni
bashbunni / .zshrc
Created October 27, 2022 21:41
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
@leandronsp
leandronsp / 001-README.md
Last active June 3, 2025 11:50
OOP in Bash script

OOP in Bash script

Wait, what?

Inspired by this awesome article.

Prelude about OOP

According to wikipedia, OOP is a programming paradigm or technique based on the concept of "objects". The object structure contain data and behaviour.

Data is the object's state, which should be isolated and must be private.

// not iterable
{
const myItem = {
a: 1,
b: 2
}
// const r = [...myItem] // TypeError: myItem is not iterable
}
// now object is iterable
@ErickWendel
ErickWendel / concat-streams.mjs
Last active August 15, 2024 10:17
Example of how to consume multiple Web APIs in parallel via Node.js Streams
// npm i axios stream-concat
import { pipeline } from 'stream/promises'
import StreamConcat from 'stream-concat'
import axios from 'axios'
const API_01 = 'http://localhost:3000'
const API_02 = 'http://localhost:4000'
const streams = (await Promise.all([
axios({
@ErickWendel
ErickWendel / linkedin-post-analytics-example.mjs
Last active September 25, 2024 07:45
Example of how to get post Analytics such as Views from a Linkedin post
// paste this file on a empty directory
// npm i axios
// You should go to your browser on Cookie session and get JSESSIONID and li_at from Linkedin Section
const JSESSIONID = 'YOUR JSESSIONID'
const liAT = 'YOUR li_at'
import axios from 'axios'
const headers = {
@justiandre
justiandre / processo-adocao-nova-tecnologia-kotlin.md
Last active September 22, 2021 12:51
Processo para adoção de uma nova tecnologia - Kotlin
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active July 12, 2025 19:51
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@rponte
rponte / using-uuid-as-pk.md
Last active July 1, 2025 02:01
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes