Skip to content

Instantly share code, notes, and snippets.

View rodhfr's full-sized avatar
🎯
Focusing

Rodolfo Souza rodhfr

🎯
Focusing
View GitHub Profile
TCP/IP (wireless)
Scrcpy uses adb to communicate with the device, and adb can connect to a device over TCP/IP. The device must be connected on the same network as the computer.
Automatic
An option --tcpip allows to configure the connection automatically. There are two variants.
If adb TCP/IP mode is disabled on the device (or if you don't know the IP address), connect the device over USB, then run:
scrcpy --tcpip # without arguments
git config --global alias.pushall '!f() { for remote in $(git remote); do echo "Pushing to $remote..."; git push --all "$remote"; git push --tags "$remote"; done }; f'
tar -cf - --exclude-from=/home/rodhfr/Backup/dockernew/exclude.txt -C /home/rodhfr dockernew | pv | pigz > "/home/rodhfr/Backup/dockernew/dockernew_$(date '+%Y-%m-%d_%H-%M-%S').tar.gz"
[rodhfr@wings ~]$ distrobox create --name kickstarter_test --home /home/rodhfr/Distrobox/kickstarter_test/ --image archlinux --hostname kickstarter_test
--unshare-netns # share same ip that host
I don't know whether this will work for you. But check this solution.
I am using NVchad too for me to open a vertical or horizontal terminal I have to use "leader(space bar) + v" or "leader(space bar) + h". To come back to the currently opened editor which will be either on top of the newly opened terminal or on the left side we need to do some more.
"ctrl + x" this combination will exit/throw out your cursor from the terminal.
"ctrl + h/k/l/j" this combination will switch your cursor to the nearby opened editor.
For your reminder the keys "h,j,k,l" are generally used for navigation in vim/nvim as an alternative for the arrow keys.
# /home/rodhfr/.config/pipewire/pipewire.conf.d/snapcast.conf
context.modules = [
{ name = libpipewire-module-pipe-tunnel
args = {
node.name="snapcast"
tunnel.mode = sink
#tunnel.may-pause = true
# Set the pipe name to tunnel to
pipe.filename = "/tmp/snapfifo"
audio.format=S16LE
import os
import subprocess
import re
import time
from tqdm import tqdm
def list_subtitle_tracks(filename):
cmd = ['mkvmerge', '-i', filename]
result = subprocess.run(cmd, capture_output=True, text=True)
tracks = []

Identify the drive UUID with lsblk

lsblk -f

NAME        FSTYPE FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                  
└─sda1      xfs          largehd 88ec6f75-3a37-4608-842d-0151bda2d0b3  506.5G    46% /mnt/largehd
zram0                                                                                [SWAP]
nvme0n1                                                                              
├─nvme0n1p1 vfat FAT32 36FA-3464 579.4M 3% /boot/efi
ffmpeg -i *mkv 2>&1 | grep Subtitle
ffmpeg -i "input.mkv" 2>&1 | grep Subtitle
ffmpeg -i "input.mkv" -map 0:2 -c:s copy "subtitle.srt"
distrobox enter archbox -- cat /etc/os-release
pandoc -o book.html *epub --embed-resources --standalone