Skip to content

Instantly share code, notes, and snippets.

@Yiannis128
Yiannis128 / clamonacc-log-notifier.sh
Last active February 17, 2025 20:14
ClamAV custom notifier script that manually triggers the VirusEvent script by reading the OnAccessScan logs
#/usr/bin/env bash
# If the logs contain duplicate entries, they should be ignored to avoid spamming the user
# with duplicate notifications.
IGNORE_DUPLICATES=true
# Keeps track of the journal for virus found events and manually invokes the VirusEvent
# script because of https://github.com/Cisco-Talos/clamav/issues/1062
while IFS= read LINE;do
if [[ $LINE == *"FOUND"* ]]; then
@Yiannis128
Yiannis128 / clamonacc-log-monitor.sh
Last active February 17, 2025 20:14
ClamAV VirusEvent log monitor script for passing information to custom notifier script for triggering VirusEvent
#!/usr/bin/env sh
# Get the output of the clamav-clamonacc service which is the OnAccessScan service and pipe it into
# the notifier script which will manually call the VirusEvent.
journalctl --follow -n 0 --output=cat -eu clamav-clamonacc | /opt/clamav/clamonacc-log-notifier.sh
@Yiannis128
Yiannis128 / virus-event.sh
Created February 17, 2025 20:02
ClamAV VirusEvent script with options
#!/usr/bin/env bash
# VirusEvent made by Yiannis Charalambous that exposes GUI actions to be taken against found
# signatures.
#
# Original Code: https://github.com/Cisco-Talos/clamav/issues/1062#issuecomment-1771546865
PATH=/usr/bin
APP_NAME="ClamAV"
@Yiannis128
Yiannis128 / gist:dce0674ff9c17108695514ad6891f985
Last active June 11, 2024 00:16
[yt-dlp] GUI Download Music Python
#!/usr/bin/env python3
# Author: Yiannis Charalambous
# Simple GUI for YT-DLP Downloading Music
import tkinter as tk
from tkinter import ttk
import pathlib
from subprocess import PIPE, STDOUT, run, CompletedProcess
@Yiannis128
Yiannis128 / nextcloud-theme.css
Last active July 24, 2024 00:46
My personal rice of NextCloud. It should make it more professional looking as I hate the overly circular look of every element.
/* Expand page content and remove circular border. This was introduced in NX 26
which added the theming options and updated the look. But this made it so there
is a big margin on the entire page.
Content of the app (not header) */
#content-vue, #content {
margin-left: 0;
border-radius: 0;
left: 0;
right: 0;
margin-right: 0;
@Yiannis128
Yiannis128 / youtube-rss-subscriptions
Last active April 10, 2025 23:20
This is a python script that extracts your YouTube subscriptions into an RSS feed. Simply provide as an argument to the script, the path where you have the html file saved of the https://www.youtube.com/feed/channels make sure to check the whole page is saved because the script can only see the channels that are in that file.
#!/usr/bin/env python3
# Licence: GPLV3
import requests
from bs4 import BeautifulSoup as soup
from sys import argv as argv
from time import sleep
def get_channel_id(url):