Skip to content

Instantly share code, notes, and snippets.

View siavashserver's full-sized avatar

Siavash Eliasi siavashserver

View GitHub Profile
@siavashserver
siavashserver / kde_dpms.md
Created May 10, 2021 03:04
Power off display when screen is locked

Settings > Notifications > Screen Saver > Configure Events > Screen Locked

/bin/sleep 5; /usr/bin/xset dpms force off
@siavashserver
siavashserver / storage_partition.md
Last active March 2, 2021 15:39
Separate Data Storage Partition
@siavashserver
siavashserver / fonts.conf
Created December 1, 2020 10:55
Set Default Persian Font
<fontconfig>
<match>
<edit mode="prepend" name="family">
<string>Shabnam</string>
</edit>
</match>
</fontconfig>
@siavashserver
siavashserver / nvidia-power-management.conf
Created November 30, 2020 19:42
/etc/modprobe.d/nvidia-power-management.conf
options nvidia NVreg_RegistryDwords="OverrideMaxPerf=0x1"
@siavashserver
siavashserver / fish_setup.md
Last active November 15, 2020 07:08
Fish Setup

Env vars

set -Ux JEKYLL_ENV production

Path

set -U fish_user_paths $HOME/bin $HOME/.local/bin $HOME/.cargo/bin $HOME/.npm-global/bin (ruby -e 'puts Gem.user_dir')/bin

@siavashserver
siavashserver / nodejs_setup.md
Created October 5, 2020 19:25
nodejs local binary install

mkdir ~/.npm-global

npm config set prefix '~/.npm-global'

export PATH=~/.npm-global/bin:$PATH

@siavashserver
siavashserver / ruby_dbm_fix.md
Created September 13, 2020 03:07
Ruby (Gem) Fails to Build `dbm` on Windows

ridk exec pacman -S mingw-w64-x86_64-gdbm

@siavashserver
siavashserver / hp_p1102_lpr.md
Last active July 31, 2020 08:51
HP P1102 Printing Over LPR

Should Work (TM) on Ubuntu

Install required dependencies on ArchLinux

(And enable the cups, avahi daemons)

Example: cups cups-filters hplip hplip-plugin(AUR)

Set LPR protocol, Router Address, and Queue name

lpr://192.168.1.1/LPRServer

@siavashserver
siavashserver / ffmpeg_cheats.md
Last active December 11, 2020 15:12
FFMPEG Cheat Sheet

Convert Videos

ffmpeg -i in.mp4 -c:v libx265 -preset slow -crf 23 -pix_fmt yuv420p10le -c:a libopus -b:a 64k out.mkv

Analyze Audio Loudness Using FFMPEG (Mean, Max db)

ffmpeg -i "file_name.webm" -af "volumedetect" -vn -sn -dn -f null /dev/null
@siavashserver
siavashserver / web_server.md
Created July 11, 2020 17:06
Handy Web Server

python3 -m http.server