Skip to content

Instantly share code, notes, and snippets.

@Vendrel
Vendrel / emlekezteto
Last active January 26, 2026 14:40
Bash Script: Szekvenciális emlékeztető egyéni hangértesítéssel (AIFF, neked kell szállítanod, és megadni a szkriptnek)
#!/bin/bash
# Ez a bash script ingyenesen használható és fejleszthető, CC0 alatt.
# Meghatározhatsz egy időintervallumot, és a szkript minden alkalommal lejátszik egy hangot.
# Megadhatsz szöveges üzenetet is, és megadhatsz egy időkeretet, amelyen kívül nem lesz emlékeztető.
# Példa: 60 percenként: igyál vizet, de csak mondjuk 7-18 óra között.
# (Az emlékeztetőhöz használható pl. a Suno vagy az ElevenLabs.
#
# NE FELEJTSD EL a fájlt futtathatóvá tenni: chmod +x <fájl>
@Vendrel
Vendrel / seqreminder
Last active January 26, 2026 14:39
Bash Script: Sequential Reminder with custom audio notification (AIFF, you must make one and give it to the script)
#!/bin/bash
# This bash script code is free to use and develop, under CC0.
# You can define a time interval, and the script will play a sound every time.
# You can also specify a text message, and you can specify a timeframe outside of which there will be no reminder.
# My use case: reminds me to drink water.
#
# DO NOT FORGET to make the file executable: chmod +x <file>
# ====== Defaults ======
@Vendrel
Vendrel / netmonitor
Last active February 24, 2026 09:14
Bash Script to monitor your network connection. Plays AIFF audio files (you specify in arguments) as notification sounds, not attached.
#!/bin/bash
# This bash script code is free to use and develop, under CC0.
# Paste it into a file named "netmonitor", and don't forget to run the "chmod +x netmonitor" command in its folder.
# It is recommended to place the file in your main user folder for easy access: "~/netmonitor".
# I used Suno for the notification sounds. ElevenLabs or similar voice generators may also be useful.
# This is your task, I can't attach my any voice files here.
# Ez a bash script kód ingyenesen használható és fejleszthető, CC0 alatt.
# Illeszd be egy "netmonitor" nevű fájlba, és ne felejtsd el futtatni a "chmod +x netmonitor" parancsot a mappájában.
@Vendrel
Vendrel / sleepmac
Last active January 30, 2026 10:00
Bash Script :: Force Apple Mac go back to Sleep Mode if an application/daemon etc. or external device wakes it and/or does not let it go back to sleep. (Automatic System Language detection; it's English if not Hungarian!)
#!/usr/bin/env bash
langs=$(defaults read NSGlobalDomain AppleLanguages | tr -d '",() ')
user_lang="en"
if [[ "$langs" == *hu* ]]; then
user_lang="hu"
if [[ -z "$1" ]]; then
echo "Használat: <min. 10 másodpercnyi kezdeti késleltetés> <min. 20 másodpercnyi ismétlődő időzítés>"
echo "Pl. sleepmac 10 20 → 10 másodperc múlva elalszik a gép, majd ha aktív kijelzővel felébred (magától, vagy felébreszted), akkor 20 másodperc múlva erőltetve visszaalszik."
echo ""