This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Script: rename_opus.py | |
This Python script is designed to search through a specified directory and its subdirectories | |
to locate all `.opus` audio files, process them, and rename them based on their contents. | |
It primarily performs the following operations: | |
1. **Directory Traversal**: | |
- The script begins by accepting a directory path as a command-line argument. | |
- It checks if the directory exists, then recursively searches through the directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Stuudium õpetaja - päeviku vaates värvilised lahtrid | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-06-06 | |
// @description try to take over the world! | |
// @author You | |
// @match https://torvakool.ope.ee/journal/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=ope.ee | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Grade Highlighter | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Highlights grades based on their value | |
// @author Your Name | |
// @match *://torvakool.ope.ee/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ABOUT THIS SCRIPT | |
# This script automates the setup of an email server on Alpine Linux using Postfix, OpenDKIM, and PostSRSd. | |
# It configures all necessary components to send and receive emails securely and handles virtual mailing lists. | |
# | |
# USAGE | |
# 1. Modify the configuration variables below to match your domain and server settings. | |
# 2. Run the script as root. | |
# 3. After running the script, ensure that you see the master process, the postsrsd process and the opendkim process in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new MutationObserver((mutations) => { | |
mutations.forEach((mutation) => { | |
if (mutation.addedNodes.length > 0) { | |
const addedNode = mutation.addedNodes[0] as HTMLElement; | |
if (addedNode.tagName) { | |
console.log(`${addedNode.tagName}, id='${addedNode.id}', class='${addedNode.className}', innerText='${addedNode.innerText}'`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script checks the consistency between a public key stored in DNS records and a public key derived from a provided private key file. | |
# It requires three arguments: | |
# 1. A selector that identifies the public key in the DNS. | |
# 2. A domain name where the DNS record is located. | |
# 3. The path to the private key file. | |
# | |
# Usage: | |
# ./script_name <selector> <domain> <private_key_file> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MikroTik RouterOS 7.14.1 (c) 1999-2024 https://www.mikrotik.com/ | |
Press F1 for help | |
[T0nu@MikroTik CRS326-24G-2S+IN] > /caps-man/ | |
[T0nu@MikroTik CRS326-24G-2S+IN] /caps-man> export terse | |
# 2024-04-06 17:19:39 by RouterOS 7.14.1 | |
# software id = TJ0X-IPUB | |
# | |
# model = CRS326-24G-2S+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
// Set the timer | |
$start = microtime(true); | |
// Set the default timezone from the system | |
date_default_timezone_set(json_decode(file_get_contents('http://ip-api.com/json'))->timezone); | |
// Show the start time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find . -maxdepth 1 -mindepth 1 -exec du -sh {} \; 2>/dev/null | sort -h | sed 's|\./||' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enhanced PowerShell Script for MySQL/MariaDB Database Dump and Restore | |
# | |
# This script automates dumping and restoring databases using mysqldump and mysql, with support for configuration | |
# detection and fallbacks. It checks for database configuration in 'config.php' or 'wp-config.php' files, or uses | |
# the current directory name if no database name is provided. Users can customize behavior through command-line | |
# arguments for various parameters. | |
# | |
# Usage Examples: | |
# | |
# 1. Dumping a Database: |
NewerOlder