Skip to content

Instantly share code, notes, and snippets.

If you are using discord package from pacman from time to time you get message that you need to download discord extract the package and replace existing /opt/discord directory with new one.

This script is to automate this process. When you download discord archive (tar.gz) from the discord prompt it will be placed in ~/Downloads. This script will look for this archive, unpack it and place new archive in coorect place. Now discord should work when you open it again.

#!/bin/bash

NEW_DISORD_ARCHIVE=$(find ~/Downloads/ -name "discord-*.tar.gz" -printf '%T+ %p\n' | sort | tail -n 1 | cut -d' ' -f2)
DISCORD_LOCATION=/opt/discord
DISCORD_TMP_LOCATION=/tmp/Discord
@filipizydorczyk
filipizydorczyk / Converting GNOME Calendar cache to ics file.md
Last active November 20, 2022 23:27
If you lost you access to your accont on google, microsoft or nextcloud and were using gnome calendar to see them you still might get 'em back!

Have you ever done backups of your calendars and didint check if your files are corrupted and then deleted your whole nextcloud instance and after installing new one you realized your mistake? Me neither... But totally for no reason I did find a way to get them back if you were using linux with GNOME! Actually its not only for nextcloud but also for google, microsoft and every other onnline account you can add to gnome and use to store your calendars. GNOME callednar is caching your calendars so that you can still see them when you have no access to internet or there are any sync issues. We can use that cache to get your calendars back! To find your cache navigate to $HOME/.cache/evolution/calendar. You should see somthing like this

~ $HOME/.cache/evolution/calendar 
 ➜ calendar ls
0a87c2b5012933d1534f52d9b997a98d1c318c8f  2c7b3f33739532dbee1091e56ad84be880cc070c  89b418dae31103ee82eea7214e84007a672411ad  9dbe695f4c07b7c5ef62b25930a28b133f33d21e
0c6e6f6cda08