Skip to content

Instantly share code, notes, and snippets.

View george124816's full-sized avatar

George Rodrigues george124816

View GitHub Profile
@george124816
george124816 / 30-trackball.conf
Last active May 19, 2025 14:49
Configuration to ELECOM DEFT Pro TrackBall
Section "InputClass"
Identifier "ELECOM TrackBall Mouse DEFT Pro TrackBall"
MatchProduct "ELECOM TrackBall Mouse DEFT Pro TrackBall"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "11"
Option "NaturalScrolling" "false"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 1 3 2"
EndSection
@george124816
george124816 / http_post_to_kafka.go
Created February 11, 2025 01:05
Simple HTTP endpoint forwading to Kafka
package main
import (
"fmt"
"io"
"log"
"net/http"
"github.com/confluentinc/confluent-kafka-go/kafka"
)
#!/bin/bash
# Check if exactly one argument is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 {up|down}"
exit 1
fi
# Get the argument
ACTION=$1
@george124816
george124816 / notes
Created May 21, 2024 14:04
note system
#!/bin/bash
year=$(date +%Y)
month=$(date +%m)
day=$(date +%d)
template="$year-$month-$day\n\nTODO:"
dir=$HOME/notes
folder_path=$dir/$year/$month
localectl set-x11-keymap us pc105 intl
@george124816
george124816 / sound.org
Created June 15, 2022 13:02
change audio output on linux
pactl set-sink-port alsa_output.pci-0000_09_00.4.analog-stereo analog-output-headphones
pactl set-sink-port alsa_output.pci-0000_09_00.4.analog-stereo analog-output-lineout
@george124816
george124816 / vpn
Last active September 30, 2022 18:57
VPN Script
#!/bin/elixir
System.argv()
|> case do
["up"] ->
System.cmd("nmcli", ["connection", "up", "work"])
|> IO.inspect()
["down"] ->
System.cmd("nmcli", ["connection", "down", "work"])
@george124816
george124816 / myip
Last active October 14, 2022 13:16
retrieve ipv4 and ipv6 from cli
#!/bin/bash
# pacman -S dnsutils
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
dig +short txt ch whoami.cloudflare @1.0.0.1
@george124816
george124816 / example.org
Created May 18, 2022 22:42
Some org mode and babel execution

Example Org Mode with Org Babel

Variables

echo "https://api.ipify.org"
#!elixir
case System.argv() do
["up"] ->
"nmcli connection up work"
|> String.to_charlist()
|> :os.cmd()
|> List.to_string()
|> String.trim()
|> IO.puts()