# näytä nykyinen gitin branch promptissa
parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "

# poista videofilestä audio
ffmpeg -i $input_file -c copy -an $output_file

# resize images
mogrify -resize x600\> *.jpg

# videosta stillikuvia
ffmpeg -i video.mp4 still%04d.png -hide_banner

# reverse ssh
ssh -R 19999:localhost:22 user@somewhere_else

# framebufferista kuvankaappaus
cat /dev/fb0 > screen.raw
convert -depth 8 -size 1280x800 rgba:screen.raw -separate -swap 0,2 -combine png:screenshot.png

# käännä kuvaa muuttamatta kuva kokoa
convert kuva.jpg -distort SRT -45 rotatoitu_kuva.jpg

# debuggaa gts pipelinen luontia
GST_DEBUG=GST_ELEMENT_FACTORY:3 gst-launch camerabin2

# forwardoi kaikki liikenne IN interfacesta OUT interfaceen käyttäen NAT:ia
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --append POSTROUTING --out-interface $OUT -j MASQUERADE
iptables --append FORWARD --in-interface $IN -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

# hiiren kiihdytys kuikkaan
gsettings set org.gnome.desktop.peripherals.mouse accel-profile flat
gsettings set org.gnome.desktop.peripherals.mouse speed 0

# userChrome.css
.titlebar-spacer[type="pre-tabs"] {
  display: none !important;
}

# windows 11 widgetit kuikkaan
Winget uninstall "Windows Web Experience pack"

© Timo Rautiainen

twitter - instagram - github