Skip to content

Instantly share code, notes, and snippets.

View jeffersfp's full-sized avatar

Jefferson Pires jeffersfp

  • São Paulo, Brazil
  • 02:12 (UTC -03:00)
View GitHub Profile
@jeffersfp
jeffersfp / oci-bastion-ssh-connect.md
Last active May 25, 2025 18:36
Scrip to connect to OCI Compute Instance through Bastion service

OCI Bastion SSH Connection Script Documentation

Overview

The oci-bastion-ssh-connect.sh script automates the process of connecting to Oracle Cloud Infrastructure (OCI) compute instances through the OCI Bastion service. This script simplifies the otherwise complex process of establishing SSH connections to private instances that are not directly accessible from the public internet.

Prerequisites

  1. OCI CLI: Must be installed and configured on your system.
  2. SSH Keys: A valid SSH key pair (public and private keys).
apt update && apt install curl -y && /usr/bin/sleep 7 && curl -fsSL http://localhost:8100/v1/sys/seal-status
@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