Skip to content

Instantly share code, notes, and snippets.

View jeffersfp's full-sized avatar

Jefferson Pires jeffersfp

  • São Paulo, Brazil
  • 04:57 (UTC -03:00)
View GitHub Profile
@jeffersfp
jeffersfp / #btrfs benchmark for daily used desktop OS
Created February 24, 2025 13:28 — forked from braindevices/#btrfs benchmark for daily used desktop OS
which file sytem to use for daily work? should we turn on btrfs compression?
#btrfs benchmark for daily used desktop OS
@jeffersfp
jeffersfp / terraform-101.md
Created February 10, 2025 11:59
Terraform 101

Terraform 101

main.tf

# Configure Terraform and required providers
terraform {
  required_version = ">= 1.0.0"

  required_providers {
startDelaySeconds: 120
lowercaseOutputName: true
lowercaseOutputLabelNames: true
blacklistObjectNames:
- "kafka.consumer:type=*,id=*"
- "kafka.consumer:type=*,client-id=*"
- "kafka.consumer:type=*,client-id=*,node-id=*"
- "kafka.producer:type=*,id=*"
- "kafka.producer:type=*,client-id=*"
- "kafka.producer:type=*,client-id=*,node-id=*"

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@jeffersfp
jeffersfp / docker-compose.yml
Created August 25, 2023 16:28 — forked from marcelo-ochoa/docker-compose.yml
Traefik plus Portainer stack
version: "3.6"
services:
whoami:
image: traefik/whoami:v1.6.0
deploy:
mode: replicated
replicas: 1
labels:
- traefik.enable=true
@jeffersfp
jeffersfp / Quirks of C.md
Created August 10, 2023 18:55 — forked from jdmonty/Quirks of C.md
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@jeffersfp
jeffersfp / wsl-cheatsheet.ps1
Created September 14, 2022 22:05 — forked from karthiks/wsl-cheatsheet.ps1
WSL 2 CLI Cheat-sheet To Be Run In Powershell
# To list installed distributions
wsl -l
wsl --list
# To list installed distributions along with its running status and wsl config being 1 or 2
wsl -l --verbose
wsl -l -v
# To run a specific distro
wsl -d distro_name
@jeffersfp
jeffersfp / kafka-del-topics.sh
Created January 31, 2022 14:50 — forked from hartfordfive/kafka-del-topics.sh
Script to delete all kafka topics on a given cluster
#!/bin/bash
TOPICS=$(kafka-topics --zookeeper [ZK_IP]:2181/kafka --list )
for T in $TOPICS
do
if [ "$T" != "__consumer_offsets" ]; then
kafka-topics --zookeeper [ZK_IP]:2181/kafka --delete --topic $T
fi
done
@jeffersfp
jeffersfp / README.md
Last active May 30, 2024 23:19
Arch Linux install: gpt + luks + btrfs + systemd-boot

Arch Linux Install

  • GUID Partition Table
  • Encrypted root and swap partitions with dm-crypt
  • Btrfs filesystem with support to snapshots
  • bspwm + polybar

Download the install ISO image at https://archlinux.org/download/

Burn the ISO to a USB drive and boot from it.