Skip to content

Instantly share code, notes, and snippets.

View guilsa's full-sized avatar
👋
@ Looking for projects

Guilherme Sa guilsa

👋
@ Looking for projects
View GitHub Profile
@guilsa
guilsa / kokoro-tts-mac-silicon.md
Last active November 10, 2025 20:14
Running Kokoro TTS model on Mac Silicon

Instructions

  1. Clone repo (https://github.com/hexgrad/kokoro)
  2. Install brew dependencies
brew install python@3.9 espeak libsndfile portaudio
  1. Create a Python 3.9 virtual environment + install Python dependencies
@guilsa
guilsa / readme.md
Created September 29, 2025 18:06
How I use Textmarker on Firefox

Things to remember

How to back up your data:

In Settings > History > it is possible to download your highlights either as JSON or text file (save to text).

How to back up app data:

Check out the Export & Import menu. Do this everytime you make a change.

@guilsa
guilsa / readme.md
Created September 27, 2025 05:05
My macOS Karabiner complex modifications

Hyper Key (Caps Lock) & Caps Lock on Tap

hyper_key.json

{
  "title": "Hyper Key (Caps Lock) & Caps Lock on Tap",
  "rules": [
    {
      "description": "Caps Lock -> Hyper Key (⌃⌥⌘⇧) when held, Caps Lock when tapped.",
@guilsa
guilsa / fetch-html.sh
Created September 19, 2025 16:49
HTML downloader script
#!/bin/bash
# A script to download the HTML content from a list of URLs.
# How to use: `chmod +x fetch-html.sh`
# ./fetch-html.sh urls.txt ./downloaded_pages
# This will read the links from `urls.txt` and save the corresponding HTML files into the `downloaded_pages` directory. Let me know if you'd like any tweaks.
# I use Link Gopher on Firefox to manually create my links.
set -euo pipefail # Fail fast on errors
@guilsa
guilsa / llm_use_cases.md
Last active October 14, 2025 22:26
Open-weight LLM models skills-set

continue.dev

Code Generation:

  • qwen2.5-coder:7b - Excellent for code completion
  • codellama:13b - Strong general coding support
  • deepseek-coder:6.7b - Fast and efficient

Chat & Reasoning:

  • llama3.1:8b - Latest Llama with tool support
@guilsa
guilsa / prompts.md
Last active August 13, 2025 12:32
LLM Prompts I found around the web

Summarize

Summarize the themes of the opinions expressed here. For each theme, output a markdown header. Include direct "quotations" (with author attribution) where appropriate. You MUST quote directly from users when crediting them, with double quotes. Fix HTML entities. Output markdown. Go long. Include a section of quotes that illustrate opinions uncommon in the rest of the piece.

Async Coding Agent

Jules

AI coding agent by Google Labs:

  • Everyday dev tasks
@guilsa
guilsa / vaiLula.sh
Last active October 3, 2022 00:14
Eleição Brasil - Primeiro Turno 2022
#!/bin/bash
while true
do
lula=$(curl -s https://resultados.tse.jus.br/oficial/ele2022/544/dados-simplificados/br/br-c0001-e000544-r.json | jq '.cand[] | select(.nm == "LULA").vap | tonumber' 2> /dev/null )
bozo=$(curl -s https://resultados.tse.jus.br/oficial/ele2022/544/dados-simplificados/br/br-c0001-e000544-r.json | jq '.cand[] | select(.nm == "JAIR BOLSONARO").vap | tonumber' 2> /dev/null )
echo $(( $lula - $bozo ))
sleep 30
@guilsa
guilsa / leetcode.js
Last active March 11, 2022 18:35
Leetcode Stuff
// Remove Element (3/11)
// https://leetcode.com/problems/remove-element/
// time o(n) | space o(1)
var removeElement = function(nums, val) {
let count = 0;
for (let i = 0; i < nums.length; i++) {
if (nums[i] !== val) {
nums[count] = nums[i];
count++;
@guilsa
guilsa / fbTechnicalScreen.js
Last active March 3, 2022 22:39
Solutions - FB Technical Screen Interview Guide (Algorithms)
// Max Ice Cream (3/3)
var maxIceCream = function(costs, coins) {
costs.sort();
for (let i = 0; i < costs.length; i++) {
if (coins >= costs[i]) {
coins -= costs[i];
} else {
return i
}
}
@guilsa
guilsa / data-structures.js
Last active May 3, 2022 15:01
CS Data Structures
// Min Heap
// since JS does not have a native heap,
// for an interview you can quickly code-up something like this
// letting interviewer know what you are doing
class MinHeap {
constructor(compareFunc) {
this.compareFunc = compareFunc;
this.heap = [];
}