Skip to content

Instantly share code, notes, and snippets.

View rodhfr's full-sized avatar
🎯
Focusing

Rodolfo Souza rodhfr

🎯
Focusing
View GitHub Profile
@rodhfr
rodhfr / Setup Jellyfin Scrobble Plugin.txt
Last active May 30, 2023 15:36
Setup Jellyfin Scrobble Plugin
Plugin homepage https://github.com/vosmiic/jellyfin-ani-sync
Official nstallation guide https://github.com/vosmiic/jellyfin-ani-sync/wiki/Installation-&-Config
Click on generate callback URL. In case you are using jellyfin on local network, e.g. http://192.168.0.60:8096/AniSync/authCallback is mine. If you're using any VPS service, it would be the hostname you access Jellyfin like mysitejellyfin.com, and you have to supply this on the API endpoint box.
My animelist save location is C:\Users\YOURUSER\AppData\Roaming\jellyfin-anisync this is the default as far as I know.
Test save location
Making the Wiki Mobile Responsive
Certain steps are needed for this, nothing is easy with this platform. Albeit various approaches, the Wikipedia utilizes the extension MobileFrontend https://www.mediawiki.org/wiki/Extension:MobileFrontend to make the mobile users see other skin instead of the one that is showed in the desktop.
Some useful links
MobileFrontend GitHub https://github.com/wikimedia/mediawiki-extensions-MobileFrontend
Mobile Frontend configurations options page
Installing the extension MobileFrontend https://github.com/wikimedia/mediawiki-extensions-MobileFrontend#configuration-options
@rodhfr
rodhfr / set gnome workspaces shortcut
Created August 21, 2023 13:42
Pop-os 22.04 just have the first four possible in the settings but i've encontered this commands that works. just type in the terminal.
gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Alt>5']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Alt><Shift>5']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6 "['<Alt>6']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6 "['<Alt><Shift>6']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7 "['<Alt>7']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7 "['<Alt><Shift>7']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-8 "['<Alt>8']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8 "['<Alt><Shift>8']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-9 "['<Alt>9']"
@rodhfr
rodhfr / sway_share_virtual_display
Last active March 27, 2025 12:24
Create virtual display with sway and share with wayvnc
swaymsg create_output
swaymsg output "HEADLESS-1" resolution 1600x720 #mobile "see something" resolution. others: #3840x2160 #1920x1080 #1280x720
wayvnc -o HEADLESS-1 :: #setup the wayvnc config file
# alternative
wayvnc --config="/home/rodhfr/.config/wayvnc/wayvnc.config" -o HDMI-A-1
##### ~/.config/wayvnc/config
#use_relative_paths=true
#address=::
@rodhfr
rodhfr / scrcpy fun commands.md
Last active March 8, 2025 02:04
scrcpy fun commands

Virtual display

--new-display=1920x1080

search for apps

adb shell pm list packages | grep vlc

in termux

pm list packages | grep vlc

Reduce bandwidth

--no-audio --max-fps=60

@rodhfr
rodhfr / tailscale funnel
Last active March 12, 2025 03:21
tailscale funnel self signed certificate
sudo tailscale funnel https+insecure://localhost:3001

Guide:

  1. Navigate to Settings > Admin Dashboard > Plugins > Repositories
  2. Add a new repository with a Repository URL of https://raw.githubusercontent.com/vosmiic/jellyfin-ani-sync/master/manifest.json. The name can be anything you like.
  3. Save, and navigate to Catalogue.
  4. Ani-Sync should be present. Click on it and install the latest version.

Fill the forms

  1. API endpoint -> only change this if you're acessing from outside localhost (127.0.0.1) if you are then use the server ip machine or the dns address
  2. Callback Redirect URL -> skip this

XDG Desktop Portals - Setup and Explanation

📌 Main Reference

The best source of information on XDG Desktop Portals is the Arch Linux Wiki.

🔍 What are XDG Desktop Portals?

xdg-desktop-portals act as bridges that allow Flatpaks (a type of container) to communicate with the host system.

Available Implementations

You can install multiple implementations without conflicts, such as:

@rodhfr
rodhfr / ffmpeg udp video
Last active March 19, 2025 13:47
udp stream
ffmpeg -stream_loop -i "$input" -vf "subtitles=${input@Q}" -c:v libx264 -crf 18 -f mpegts udp://192.168.0.51:8581
# intel hevc_qsv # alternatively: h264_qsv
ffmpeg -stream_loop -1 -i "$input" -vf "subtitles=${input@Q}" -c:v hevc_qsv -global_quality 20 -look_ahead 1 -f mpegts udp://192.168.0.51:8581
# udp address is the client that the video is fowarded to
@rodhfr
rodhfr / keyd-default.conf
Last active April 9, 2025 18:29
provisional keyd config
include layouts/dvorak
[ids]
*
[keymap]
layout = us