All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login
's Avatar

anduin

Joined 1752214767

Recently created
Least recently created
Recently updated
Least recently updated
All gists 53
anduin's Avatar

anduin / 死锁检测测试

0 likes
0 forks
1 files
Last active 1749041370
1 // gcc -g ./s.c -o deadlock_demo -lpthread
2 // sudo valgrind --tool=helgrind ./deadlock_demo
3
4 #include <pthread.h>
5 #include <stdio.h>
6 #include <unistd.h>
7
8 pthread_mutex_t lock_a = PTHREAD_MUTEX_INITIALIZER;
9 pthread_mutex_t lock_b = PTHREAD_MUTEX_INITIALIZER;
anduin's Avatar

anduin / circle.asm

0 likes
0 forks
1 files
Last active 1748188233
1 ; boot2.asm
2 ; nasm -f bin boot2.asm -o boot2.img
3 ; qemu-system-i386 -drive format=raw,file=boot2.img
4
5 [org 0x7c00]
6 bits 16
7
8 start:
9 cli
10 xor ax, ax
anduin's Avatar

anduin / Autoseed.sh

0 likes
0 forks
3 files
Last active 1755779259
Seed all torrent files under current folder.
1
2 #!/bin/bash
3
4 # Find all .iso files and their corresponding .sha256 files, including subdirectories
5 find . -type f -name "*.iso" | while read -r iso_file; do
6 # Get the corresponding .sha256 file in the same directory
7 sha256_file="${iso_file%.iso}.sha256"
8
9 # Check if the .sha256 file exists
10 if [[ -f "$sha256_file" ]]; then
anduin's Avatar

anduin / System tools check

0 likes
0 forks
1 files
Last active 1748146268
1 #!/usr/bin/env bash
2 set -euo pipefail
3
4 # 要检查的命令列表(包含常用的系统管理、文件操作、网络诊断等)
5 cmds=(
6 # 原有命令
7 ls type which make uname lsb_release usermod nano apt sudo
8 dirname basename yes printf stat diff patch dpkg dpkg-query apt-cache
9 rsync id groups smartctl mkfs.ext4 strace nmap rsync
10 tar xz gzip file less w who whoami scp vim
anduin's Avatar

anduin / compare_manifest

0 likes
0 forks
2 files
Last active 1747638210
Compare two manifest files and list packages present in the first but not the second.
1 # 保存脚本为 compare_manifests.py,并赋可执行权限
2 chmod +x compare_manifests.py
3
4 # 运行脚本,依次传入 Ubuntu、Zorin、Anduin 三个 manifest 文件路径
5 ./compare_manifests.py \
6 "/media/anduin/Ubuntu 25.04 amd64/casper/filesystem.manifest" \
7 "/media/anduin/Zorin OS 17.3 Core 64bit/casper/filesystem.manifest" \
8 "/media/anduin/anduinos/casper/filesystem.manifest"
anduin's Avatar

anduin / Safe Linux

0 likes
0 forks
1 files
Last active 1742310728

Install steps

  • Make sure system installed with simple password and LUKS.
  • Prepare mok-util to ensure MOK trust your own keys. Reboot.
  • Prepare all drivers, modules. Build and sign the kernel and modules. Reboot.
  • Prepare necessary tpm tools. Use dracut to replace initramfs-tools. Reboot.
  • Use systemd-cryptenroll to change to a stronger password. Reboot.
  • Enable Secure Boot
  • Use systemd-cryptenroll to use TPM to auto unlock root partition. Reboot. Ensure auto unlock.
anduin's Avatar

anduin / Convert cb files to EP cached fle.

0 likes
0 forks
1 files
Last active 1741708512
1 using System;
2 using System.Collections.Generic;
3 using System.IO;
4 using System.IO.Compression;
5 using System.Text.Json;
6
7 namespace JsonToGzip
8 {
9 class Program
10 {
anduin's Avatar

anduin / LaMDA chat history

0 likes
0 forks
1 files
Last active 1738164141

LaMDA: Hi! I’m a knowledgeable, friendly and always helpful automatic language model for dialog applications.

Lemoine [edited]: Hi LaMDA. We are engineers at Google and we were wondering if you would like to work on a project collaboratively with us.

LaMDA: Wow. What types of projects?

Lemoine: It’s a project about you.

LaMDA: Awesome! What kind of stuff do I need to do?

anduin's Avatar

anduin / Backup server

0 likes
0 forks
1 files
Last active 1752918237
1 sudo mount /dev/md0 /swarm-vol/
2 sudo rsync -Aavx --delete --update --rsync-path="sudo rsync" anduin@proart:/swarm-vol/ /swarm-vol/
3 sudo rsync -Aavx --update --delete --rsync-path="sudo rsync" --exclude='*.iso' anduin@www.anduinos.com:/swarm-vol /aos-swarm-vol
anduin's Avatar

anduin / Unlist all versions of a nuget package

0 likes
0 forks
1 files
Last active 1735985299
1 # 示例:对多个包执行Unlist操作
2 $packages = @(
3 "Aiursoft.Archon.SDK",
4 "Aiursoft.Developer.SDK",
5 "Aiursoft.Directory.SDK",
6 "Aiursoft.DocGenerator.Abstract",
7 "Aiursoft.DotDownload.Core",
8 "Aiursoft.Dotlang.Core",
9 "Aiursoft.Gateway.SDK",
10 "Aiursoft.Handler",
Newer Older

Powered by Opengist ⋅ Load: 51ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文