Skip to content

Instantly share code, notes, and snippets.

Specifying the Kernel to Use on Reboot in Grub2

(by ChatGPT)

You can specify which kernel to use at reboot. Here are a few options to achieve this:


1. Temporarily Specify the Kernel for the Next Reboot

Get box drive path from box page

Detecting TRIM Commands with kprobe:blk_mq_start_request

(by ChatGPT)
This document describes how to use bpftrace and the kprobe:blk_mq_start_request probe to monitor TRIM (discard) operations issued by the Linux kernel I/O scheduler.

✅ What It Does

The following bpftrace script hooks into the blk_mq_start_request(struct request *rq) kernel function and checks if the request is a discard (TRIM) operation. If so, it prints the target device name.

bash history preferences

HISTCONTROL=ignorespace:ignoredups:erasedups
HISTSIZE=100000
HISTFILESIZE=100000

Backup Slack Log

slackdump

Tool: rusq/slackdump
Description: Save or export your private/public Slack messages, threads, files, and users locally without admin privileges.

version: 3.0.10 and 3.1.1

1. Get Token and Cookie

nextcloud setup

version

Item Value
Nextcloud 31.0.4
MariaDB 11.4
elasticsearch 8.18.0
Collabora Office 25.04.1.1

nice web mail server

Roundcube - Free and Open Source Webmail Software

  • Web UI. mobile browser ready.
  • easy to setup with docker
  • exploits IMAP search for FTS search
docker run -e ROUNDCUBEMAIL_DEFAULT_HOST=hostname -e ROUNDCUBEMAIL_SMTP_SERVER=hostname -p 8000:80 -d --name roundcubemail --rm roundcube/roundcubemail

certbot webroot way

sudo -e /etc/nginx/sites-available/default

server {
    ....
    location /.well-known/acme-challenge/ {
        root /path/to/www;
    }
 ...

dovecot imap server sample

v2.4

config: config/mine.conf

ssl=no
# auth_allow_weak_schemes=yes
auth_allow_cleartext=yes
auth_mechanisms = plain login cram-md5

check postgres access

SELECT pid, application_name, state, backend_start FROM pg_stat_activity WHERE pid <> pg_backend_pid();