Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
ZiTAL / a.sh
Created Apr 28, 2020
A package to download free Springer books during Covid-19 quarantine
View a.sh
# A package to download free Springer books during Covid-19 quarantine
# https://www.statsandr.com/blog/a-package-to-download-free-springer-books-during-covid-19-quarantine/#installation
#debian #gnu #linux
su
echo "deb http://cran.rediris.es/bin/linux/debian buster-cran40/" > /etc/apt/sources.list.d/r.list
@ZiTAL
ZiTAL / ffmpeg_black_border.sh
Created Apr 25, 2020
ffmpeg: add black border to video
View ffmpeg_black_border.sh
#!/bin/bash
# original video 480x196 -> to 16:9 480x270 -> 270-196 = 74 -> 74 / 2 = 37
# add 74 pixels, 37 from top and 37 from bottom
ffmpeg -i input.avi -pix_fmt yuv420p -filter_complex "[0]pad=h=74+ih:y=37:color=black" output.mp4
@ZiTAL
ZiTAL / a_bluetooth.sh
Last active May 18, 2020
debian: pair bluetooth audio device
View a_bluetooth.sh
su
apt install bluetooth pulseaudio-module-bluetooth
/etc/init.d/bluetooth stop
pactl unload-module module-bluetooth-discover
pactl load-module module-bluetooth-discover
/etc/init.d/bluetooth start
exit
bluetoothctl
[bluetooth]# untrust F8:DF:15:C7:1C:3D
@ZiTAL
ZiTAL / f.sh
Created Mar 28, 2020
ffmpeg: concat videos
View f.sh
$ cat a.txt
file '001.mp4'
file '002.mp4'
file '003.mp4'
$ ffmpeg -f concat -safe 0 -i a.txt a.mp4
@ZiTAL
ZiTAL / uninstall.sh
Created Mar 16, 2020
lxqt: RTNETLINK answers: Operation not possible due to RF-kill
View uninstall.sh
#!/bin/bash
su
apt-get remove --purge cmst
apt autoremove
exit
@ZiTAL
ZiTAL / lxqt-rc.xml
Last active Mar 16, 2020
lxqt + openbox: lxqt-runner + show desktop Alt + F2
View lxqt-rc.xml
<!-- .config/openbox/lxqt-rc.xml -->
...
<keybind key="A-F2">
<action name="Execute">
<!--
<command>lxpanelctl run</command>
-->
<command>/usr/bin/lxqt-runner</command>
</action>
</keybind>
@ZiTAL
ZiTAL / update-alternatives.sh
Created Mar 16, 2020
update-alternatives: x eta sagua
View update-alternatives.sh
#!/bin/bash
update-alternatives --config x-window-manager
update-alternatives --config x-cursor-theme
View Xwrapper.config
#/etc/X11/Xwrapper.config
allowed_users = anybody
View ffmpeg_gif_to_mp4.sh
ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4
@ZiTAL
ZiTAL / ffmpeg_ac3_stereo.sh
Created Mar 7, 2020
ffmpeg: ac3 5.1 -> stereo
View ffmpeg_ac3_stereo.sh
ffmpeg -i input.avi -ac 2 -af "pan=stereo|FL=FC+0.30*FL+0.30*BL|FR=FC+0.30*FR+0.30*BR" output.mp4
You can’t perform that action at this time.