Skip to content

Instantly share code, notes, and snippets.

View metalefty's full-sized avatar
♥️
Looking for sponsors

metalefty

♥️
Looking for sponsors
View GitHub Profile
@metalefty
metalefty / vm-completion.zsh
Last active February 26, 2025 09:49
Zsh completion for vm-bhyve
#compdef vm
# Copyright (c) 2025, Koichiro Iwao (metalefty) <[email protected]>
# SPDX-License-Identifier: BSD-2-Clause
#
# vim: ts=4 sw=4 expandtab
_vm()
{
--- /etc/mock/almalinux-9-x86_64.cfg 2024-12-06 03:32:09.116184024 +0000
+++ /etc/mock/almalinux-9.4-x86_64.cfg 2024-12-06 03:32:03.033261792 +0000
@@ -1,4 +1,4 @@
-include('templates/almalinux-9.tpl')
+include('templates/almalinux-9.4.tpl')
config_opts['root'] = 'almalinux-9-x86_64'
config_opts['description'] = 'AlmaLinux 9'
@metalefty
metalefty / almalinux-10-kitten-aarch64.cfg
Created November 7, 2024 08:42
Mock config for AlmaLinux 10 Kitten
include('templates/almalinux-10-kitten.tpl')
config_opts['root'] = 'almalinux-10-kitten-aarch64'
config_opts['description'] = 'AlmaLinux 9'
config_opts['target_arch'] = 'aarch64'
config_opts['legal_host_arches'] = ('aarch64',)
build started at Tue Aug 6 15:35:47 JST 2024
port directory: /usr/ports/x11-drivers/xorgxrdp
package name: xorgxrdp-0.10.2
building for: FreeBSD 14amd64-default 14.0-RELEASE-p6 FreeBSD 14.0-RELEASE-p6 amd64
maintained by: [email protected]
port version: 0.10.2
port revision: 0
Makefile datestamp: -rw-r--r-- 1 root wheel 1252 Aug 6 03:53 /usr/ports/x11-drivers/xorgxrdp/Makefile
Ports top last git commit: aa1abe685f
Ports top unclean checkout: no
@metalefty
metalefty / rss.py
Last active July 2, 2024 00:29
RSS Feeder script from Rocky Linux
#!/usr/bin/env python3
# -*-:python; coding:utf-8; -*-
# author: Louis Abel <[email protected]>
# modified version of repo-rss from yum utils
# changelog
# -> 20230912: do not xmlescape entire description variable
import sys
import os
import re
/*
* Compile with
* gcc -Wall -o paint paint.c
*
* Run with
* ./paint $(tput lines) $(tput cols)
*/
#include <stdio.h>
#include <stdlib.h>
@metalefty
metalefty / logresolve.sh
Last active July 6, 2023 01:00
nginxやApacheのログのIPアドレスを逆引きするワンライナー
ruby -rresolv -ane 'puts "#{(Resolv.getname($F[0]) rescue $F[0])} #{$F[1..-1].join(" ")}"'
#!/bin/bash -xe
MOUNTPOINT=$(mktemp -d)
CHECKSUM=$(mktemp)
LODEV=$(losetup -f)
IMAGE_FILE=AlmaLinux-9-RaspberryPi-GNOME-latest.aarch64.raw.xz
IMAGE_URL=$(curl -s https://mirrors.almalinux.org/mirrorlist/9/raspberrypi/ | \
sort -R | head -n1 | grep -o "^.*almalinux/" )/9/raspberrypi/images/
text
lang en_US.UTF-8
keyboard us
timezone --utc Asia/Tokyo
# Disk
bootloader --append="console=ttyS0,115200n8 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1
auth --enableshadow --passalgo=sha512
selinux --enforcing
firewall --enabled --service=ssh
firstboot --disable
@metalefty
metalefty / IX2105-firmware-update.md
Last active October 26, 2022 07:57
IX2105ファームウェアアップデート手順

IX2105ファームウェアアップデート手順

IX2105のファームウェアアップデート手順の解説は多くの方がやっていますが、自分のやりやすい方法をまとめておきます。

手持ちのIX2105での方法を記録していますが、他のIXシリーズでも同様のはず。

事前準備

以下のサイトからファームウェアをダウンロードする(要パスワード)。