Skip to content

Instantly share code, notes, and snippets.

View frgomes's full-sized avatar

Richard Gomes frgomes

View GitHub Profile
@frgomes
frgomes / .gitconfig
Last active October 19, 2025 16:21
Git - Integration with IntelliJ's diff & merge tools
[user]
name = Richard Gomes
email = noreply@example.com
[alias]
pullall = !"git pull origin -v && git pull upstream -v"
fetchall = !"git fetch origin -v && git fetch upstream -v"
fetch-force = !"git fetch && git reset --hard FETCH_HEAD && git clean -df"
incoming = !"git fetch && git log ..origin/master"
unstage = reset HEAD
@frgomes
frgomes / install_tailscale.sh
Created October 3, 2025 10:35
linux :: install and configure tailscale
#!/bin/bash
cat << EOD > /etc/sysctl.d/99-tailscale.conf
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
EOD
systemctl restart sysctl
sudo systemctl start sysctl
@frgomes
frgomes / estoria-0001.txt
Created September 27, 2025 18:26
creator :: estoria-0001
Faminto, ele entra no restaurante para pedir comida. O jovem rico o vê e, só
para humilhá-lo, manda ele cantar para a plateia. Mas ninguém esperava que daquela voz sairia a canção que mudaria
a vida de todos. O frio da noite era uma criatura viva que doía através do
moletom poído. Para Francisco, de 10 anos, o frio não era apenas uma sensação, era um inimigo constante que
travava uma batalha diária pelo corpo frágil de sua irmãzinha, Clara. Ele se
encolheu no canto escuro do seu abrigo, um vão esquecido sob a estrutura de uma borracharia abandonada, e ouviu. A tosse
de clara, seca e persistente, rasgava o silêncio da madrugada. Cada acesso de
tosse era como uma agulha perfurando o coração de Francisco. Ao lado deles, em
um colchão fino e manchado, sua mãe, Marta se mexia em seu sono inquieto.
Mesmo dormindo, as mãos dela procuravam no escuro, tentando encontrar o braço de Clara, um gesto de proteção que a
@frgomes
frgomes / svelte_create_monorepo_module.md
Last active September 25, 2025 10:53
Svelte+skeletonUI :: create new module under a monorepo

I built my monorepo based on the link you suggested: https://vercel.com/templates/svelte/turborepo-sveltekit-starter

There's a folder apps/web, which we are NOT going to change.

Suggest a monorepo organization, containing another project called chatbot, which follows the architecture: Svelte + Sveltekit + Typescript + SkeletonUI.

Show which files need to be changed in order to make sure the new project chatbot is included properly into the Vite build.

In addition, provide a "Hello World" for a typical SkeletonUI app, so that I can test the build in the browser.

@frgomes
frgomes / pyproject.toml
Last active September 19, 2025 11:11
python :: pyproject.toml - template with static compilation and other lint checks
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-project"
dynamic = ["version"]
description = "Your friendly assistant"
readme = "README.md"
requires-python = ">=3.12"
@frgomes
frgomes / aisuite_ollama_fastapi_moonshine_gemma_kokoto.sh
Last active August 31, 2025 16:25
AI :: aisuite_ollama_fastapi_moonshine_gemma_kokoto.sh
#!/bin/bash
##
## This script creates a FastRTC server which is well suited for audio conversations.
##
## Credits: https://www.youtube.com/watch?v=NthuElhWDk0
###
function aisuite_check_python3() {
@frgomes
frgomes / thunderbird_exchange_server.md
Last active August 30, 2025 20:42
Thunderbird - connect to Exchange Server
@frgomes
frgomes / install_headscale.sh
Last active August 30, 2025 11:50
bash : install headscale onto Debian
#!/bin/bash -x
function headscale_globals() {
HEADSCALE_VERSION="0.26.1"
HEADSCALE_ARCH="amd64"
HEADSCALE_USER="headscale" ## DO NOT CHANGE THIS!!!
HEADSCALE_GROUP="headscale" ## DO NOT CHANGE THIS!!!
HEADSCALE_CONFIG=/etc/headscale ## DO NOT CHANGE THIS!!!
@frgomes
frgomes / python-bootstrap.sh
Last active April 5, 2025 23:44
python :: bootstrap development environment
#!/bin/bash
####################################################################################
# This file is intended to be sourced by a CI server, or used in development mode. #
####################################################################################
# Install uv :: https://pypi.org/project/uv/
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$PATH:${HOME}/.local/bin"
@frgomes
frgomes / sequence.scala
Last active July 22, 2024 22:53
FP - sequence :: Seq[Try[T]] to Try[Seq[T]]
import scala.util.Try
implicit class SeqTryExtension[T](seq: Seq[Try[T]]) {
def sequence: Try[Seq[T]] =
seq
.foldRight(Try(List.empty[T])) {
case (item, acc) => for { a <- acc; i<- item } yield i :: a
}
}