Skip to content

Instantly share code, notes, and snippets.

View henno's full-sized avatar

Henno Täht henno

View GitHub Profile
@henno
henno / cpu.tsv
Created December 14, 2024 23:44
cpu.tsv
CPU Cores CPU Mark Thread Mark TDP Socket Category
AArch64 rev 2 (aarch64) 8 2,413 909 NA Unknown Mobile/Embedded
AMD 3015Ce 2 2,099 1,337 6 FT5 Mobile/Embedded
AMD 3015e 2 2,709 1,340 6 Unknown Laptop
AMD 3020e 2 2,436 1,404 6 Unknown Laptop
AMD 4700S 8 17,862 2,361 NA Unknown Desktop
AMD A10 PRO-7350B APU 4 1,915 917 19 FP3 Laptop
AMD A10 PRO-7800B APU 2 3,303 1,494 65 FM2+ Desktop
AMD A10 PRO-7850B APU 2 3,459 1,573 95 FM2+ Desktop
AMD A10-4600M APU 2 1,938 1,078 35 FS1r2 Laptop
@henno
henno / LogNetworkStatus.ps1
Last active December 4, 2024 08:48
Windows Network Monitoring Script
$ErrorActionPreference = "SilentlyContinue"
# Variables for easy modification
# Adapter names (provide one or more adapter names)
$AdapterNames = @("Ethernet")
# Examples:
# $AdapterNames = @("Ethernet", "Wi-Fi")
# ICMP Ping destinations (provide one or more IP addresses)
@henno
henno / rename_opus.py
Last active August 30, 2024 13:53
Script renames .opus files based on audio content
"""
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
@henno
henno / stuudium-grades.js
Created June 10, 2024 12:19
Tampermonkey: Stuudium - hinnetelahtri taust roheline/punane
// ==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==
@henno
henno / stuudium-assignment-outcome-colors.js
Last active June 10, 2024 12:20
Tampermonkey: Stuudium - päeviku vaates lahtrid rohelised/punased heade/halbade sissekannete puhul
// ==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==
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}'`);
#!/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>
#!/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
@henno
henno / konff.rsc
Created April 6, 2024 14:26
mikrotik hAP AC CAP ei lase 5GHz wifisse seadmeid,aga sama CApsmanageri küljes olev AC3 laseb
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+
@henno
henno / duh.sh
Last active March 26, 2024 08:05
Disk Usage of Directory Items with Sizes Sorted
#!/bin/sh
find . -maxdepth 1 -mindepth 1 -exec du -sh {} \; 2>/dev/null | sort -h | sed 's|\./||'