Skip to content

Instantly share code, notes, and snippets.

View felipsmartins's full-sized avatar
🇧🇷
loading, please wait a few seconds...

Martins, F. felipsmartins

🇧🇷
loading, please wait a few seconds...
View GitHub Profile
@felipsmartins
felipsmartins / personalxrandr.sh
Last active April 14, 2024 00:26
xrandr posicionamento telas
#!/usr/bin/bash
set -euo pipefail
# ----------------------------------------------------------------------------------------
# https://man.archlinux.org/man/xrandr.1
# https://wiki.ubuntu.com/X/Config/Resolution
CLIPS_DIR=~/clips
# ASUS TUF (MAIN) DISPLAY POS
@felipsmartins
felipsmartins / environment
Last active November 5, 2023 18:18
/etc/environment
# adicionando em 19/02/2022 para apps flatpak iniciarem no cinnamon
XDG_CURRENT_DESKTOP=GNOME
# Stop minimizing with BorderlessFullscreen
# https://steamcommunity.com/app/281990/discussions/0/357286119110496701/
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
# refresh rate multiple displays (this is only for GNOME with NVIDIA)
@felipsmartins
felipsmartins / local-container-registry.sh
Last active July 19, 2023 20:49
DOCKER CONTAINERS LOCAL REGISTRY
#https://docs.docker.com/registry/deploying/
docker run -d -p 5000:5000 --name registry -v /home/martins/devel/docker/local-registry:/var/lib/registry registry:2
# test steps
#docker pull ubuntu:16.04
#docker tag ubuntu:16.04 localhost:5000/my-ubuntu
#docker push localhost:5000/my-ubuntu
#docker image remove ubuntu:16.04
#docker image remove localhost:5000/my-ubuntu
#docker pull localhost:5000/my-ubuntu
@felipsmartins
felipsmartins / minikube-setup.sh
Last active July 14, 2023 14:55
rootless docker minikube
docker context # should be: rootless
minikube start --kubernetes-version=1.22.17 --driver=docker --container-runtime=containerd
# loading local docker image into cluster
# NOTE: use "imagePullPolicy: IfNotPresent"
minikube image load drf3-lab
# switch cluster
kubectl config use-context <NAME>
@felipsmartins
felipsmartins / fix.md
Last active July 12, 2023 17:50
jetbrains pycharm - docker can't use local pre-built image
@felipsmartins
felipsmartins / openvpn3-debian12-bookworm-compilation.sh
Last active July 10, 2023 04:59
openvpn3-debian12-bookworm-compilation.sh
#!/usr/bin/sh
sudo apt-get install build-essential git pkg-config autoconf \
autoconf-archive libglib2.0-dev libjsoncpp-dev \
uuid-dev liblz4-dev libcap-ng-dev libxml2-utils \
python3-minimal python3-dbus python3-docutils \
python3-jinja2 libxml2-utils libtinyxml2-dev \
policykit-1 libsystemd-dev python3-systemd
git clone git://github.com/OpenVPN/openvpn3-linux
@felipsmartins
felipsmartins / nvidia-replay.sh
Last active July 9, 2023 18:46
nvidia shadow play like
# example: DP-0
MONITOR=$__GL_SYNC_DISPLAY_DEVICE
# old working comand on debian 11
# gpu-screen-recorder -o ~/clips -c mp4 -f 60 -r 15 -w $MONITOR -a "$X_AUDIO1.monitor"
# updated command
DEFAULT_AUDIO_OUTPUT=$(pactl get-default-sink)
DEFAULT_AUDIO_INPUT=$(pactl get-default-source)
gpu-screen-recorder -o ~/clips -c mp4 -f 60 -r 15 -w $MONITOR -a "$DEFAULT_AUDIO_OUTPUT.monitor|$DEFAULT_AUDIO_INPUT"
@felipsmartins
felipsmartins / delete-boot-entry.txt
Created July 8, 2023 04:01
delete a boot entry
# example
~ % sudo efibootmgr
BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0009,0008,000E,0000
Boot0000 Windows Boot Manager
Boot0008 ubuntu
Boot0009* debian
Boot000E UEFI: SanDisk, Partition 1
@felipsmartins
felipsmartins / comma-to-dot.md
Last active July 7, 2023 16:10
switch comma to dot in numpad
  1. open dconf-editor
  2. navigate to org.gnome.desktop.input-sources xkb-options
  3. add/append to the list (array): 'kpdl:dot'
  4. Save!

Short way: gsettings set org.gnome.desktop.input-sources xkb-options "['kpdl:dot']"
//gsettings set org.gnome.desktop.input-sources xkb-options "['kpdl:comma']"

credits: https://askubuntu.com/a/524843/107915

@felipsmartins
felipsmartins / akko-abnt2-remap-keys.txt
Last active June 16, 2023 19:03
AKKO ABNT2 remap keys (GNOME)
# keycode 105: tecla ctrl direito
# keycode 108: tecla alt direito (AKA AltGr)
# os comandos abaixo transforma seu "AltGr" em ";" e o "Ctrl direito" em ":"
xmodmap -e "keycode 105 = colon"
xmodmap -e "keycode 108 = semicolon"
# Ou imprimir:
# ";" quando <Ctrl direito> for pressionado
# ":" quando <Ctrl direito> + <Shift> for pressionado