ffmpeg -i in.mp4 -vf "crop=1920:1040:0:0" out.mp4
# cropped width and height ^ (we're removing 40px from the height)
# coordinates of the top-left corner ^ (we're setting the top-left corner to the top-left of the screen so we cut out the bottom 40px)
This snippet will (in current dir):
- Convert all files of
.heic
/.HEIC
extension to ones with.png
. - Remove all original
.heic
files.
find . -type f -iname '*.heic' -print0 | while IFS= read -r -d '' file; do heif-convert "$file" -f "png" && rm "$file"; done
A script that adds time of block next to it's start / end times in the timetable.
- Install a Userscript browser extension
- Tampermonkey (I use this one)
- Violentmonkey
- etc.
This little script works for both ordinary and part time timetables + has a bunch of cool QoL features ;)
(It displays the nicer timetable under the original one)
- Go to your courses page (for me its: https://usosweb.ansb.pl/kontroler.php?_action=dla_stud/studia/oceny/index)
- Open the browser Dev Tools F12
- Paste in the code:
This little script works for both ordinary and part time timetables + has a bunch of cool QoL features ;)
(It displays the nicer timetable under the original one)
- Go to your courses page (for me its: https://usosweb.ansb.pl/kontroler.php?_action=dla_stud/studia/oceny/index)
- Open the browser Dev Tools F12
- Paste in the code:
#!/bin/bash | |
# THIS ONLY CHECK THE DIFF IN AMOUNT OF FILES, NOT ACTUAL CONTENT!!! | |
# Make sure the SRC path has more files than the DST. | |
SRC_PATH="/d/Games/SteamLibrary/steamapps/common/assettocorsa/content/cars" | |
DST_PATH="//192.168.1.5/home/Backupy/AC Content Manager/content/cars" | |
DIFF_RESULT=$(diff --brief "$DST_PATH" "$SRC_PATH" \ | |
| sed --quiet "s~^Only in \($SRC_PATH\): \(.*\)~'\1\/\2'~p") |
This snippet will (in current dir):
- Convert all files of
$first_ext
extension to ones with$second_ext
. - Remove all files with the
$first_ext
extension.
first_ext="webm"
second_ext="mp4"
for i in *.$first_ext; do ffmpeg -i "$i" "${i%.*}.$second_ext"; done; for i in *.$first_ext; do rm "$i"; done
A script that highlights single date deadlines that happend to fall on a weekend (for part time students) and deadlines that are longer than a 1 day.
*The regex in this script may not work due to how other Unis write their pages!!!
- Install a Userscript browser extension
- Tampermonkey (I use this one)
/* Releases | |
- 1.0.0 Initial | |
- 1.0.1 Remove '\n' between each msg | |
*/ | |
const config = { | |
numbered: true, // whether to number the messages | |
yourResponsesMargin: 90, // amount of ' ' char | |
msgsSelector: '__fb-dark-mode x1n2onr6', // message block class (10.11.2023 for first open from right) | |
defaultChatEmoji: [ 'Gest kciuka w górę', '👍' ], // [string for default emoji ; what to replaec it with] |
A script that adds dates to individual days in the USOS timetable + fixes formatting of the 2 dates on top.
- Make sure you're using the HTML timetable!
- Install a Userscript browser extension
- Tampermonkey (I use this one)
- Violentmonkey