Skip to content

Instantly share code, notes, and snippets.

View tai271828's full-sized avatar

Tai Ho tai271828

View GitHub Profile

Install armhf debian system on qemu

Environment

Operation system: Ubuntu 16.04.6 LTS

QEMU emulator version: 2.5.0

Installation

@tai271828
tai271828 / rename.sh
Created February 5, 2024 14:53 — forked from htlin222/rename.sh
rename by ChatGPT
#!/bin/bash
# Author: Hsieh-Ting Lin
# Title: "rename"
# Date: "2024-02-05"
# Version: 1.0.0
# desc: rename by ChatGPT
API_ENDPOINT="https://api.openai.com/v1/chat/completions"
pdf_folder="."
@tai271828
tai271828 / euler1d_profiling.py
Last active January 14, 2023 23:02
Example to run profiling jobs for modmesh
# Copyright (c) 2023, Taihsiang Ho <tai271828@solvcon.net>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
This allows you to run qemu-debootstrap armhf on arm64 systems that does not support armhf native.
```
update-binfmts --package qemu-user-static --install qemu-arm /usr/bin/qemu-arm-static --magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" --offset 0 --credential yes
```
Then run `qemu-debootstrap` as normal
@tai271828
tai271828 / README.md
Created September 20, 2018 15:38 — forked from smoser/README.md
MAAS and curtin debug

Debugging curtin from within MAAS

Deploying a node with MAAS cli

You can deploy a node with the maas cli which is often preferable to clicking a button on a web UI.

$ SYSTEM_ID=node-787b19d8-d25c-11e4-9f9e-00163eca91de
$ NAME="random-nodename"
$ MAASNAME="maaslocal"

$ maas $MAASNAME machine allocate "name=$NAME"

@tai271828
tai271828 / README.md
Last active January 1, 2022 13:49
Automation for the Steam pixel remaster (PR) version of FF3 (Finaly Fantasy III)

(English below) 英文說明在下方

概述

最終幻想三(太空戰士三) Steam pixel remaster (PR) Steam PR 重製版自動化;可用於練功、刷洋蔥系裝備。

此自動化概念可拓展到其他 FF III 使用情境與更多其他遊戲;更多相關說明請參考這則網誌貼文

安裝與使用方式

此自動化方法僅適用 Linux 桌面發行版。

@tai271828
tai271828 / flags.py
Last active December 3, 2021 10:36
Python solution candidates of namespace for flags or attributes
#!/usr/bin/env python3
from enum import Enum
from collections import namedtuple
# use dict
status_dict = {
"REPORTED": "已檢舉",
"AUDIT_SCHEDULED": "已排程稽查"
}
@tai271828
tai271828 / split_ttc_font_to_ttf.py
Created August 4, 2018 08:06 — forked from yrcjaya/split_ttc_font_to_ttf.py
Convert font TTC to TTF
"""Convert TTC font to TTF using fontforge with python extension.
**Warning** The scripts saves splitted fonts in the current working directory.
Usage:
split_ttc_font_to_ttf.py Droid.ttc
Preinstallation: apt-get install python-fontforge
"""
import sys
@tai271828
tai271828 / HowTo
Created February 4, 2021 16:21 — forked from s3rj1k/HowTo
Ubuntu 20.04.1 AutoInstall
# Docs:
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53
# Download ISO Installer:
wget https://ubuntu.volia.net/ubuntu-releases/20.04.1/ubuntu-20.04.1-live-server-amd64.iso
# Create ISO distribution dirrectory:
@tai271828
tai271828 / README.md
Last active November 17, 2020 14:36
cookbook-virt-inst - for example creating a KVM domain to boot from PXE by default via virt-inst

Cookbook of virt-install

cookbook-virt-inst