Skip to content

Instantly share code, notes, and snippets.

View tai271828's full-sized avatar

Tai Ho tai271828

View GitHub Profile
@tai271828
tai271828 / README.md
Last active August 12, 2020 05:19
SHWE Toolbox - Setup net-boot server of Ubuntu server/cloud images automatically

SHWE Tool-box

Setup net-boot server of Ubuntu server/cloud images automatically

Usage

./setup-netboot.sh

@tai271828
tai271828 / README.md
Last active September 30, 2020 17:10
local-lab-tool-box - local scalebot development tool box

Local Scalebot Development Tool Box

Usage: build from sctrach including its host

./init-host.sh ./init-development-env.sh

Usage: build from scratch if the host is ready

./init-development-env.sh

clean way to rebuild on the same local host includes charm rebuild

./clean-development-env.sh

@tai271828
tai271828 / README.md
Created October 12, 2020 17:14 — forked from smoser/README.md
ubuntu-auto-install: install a ubuntu image with kvm

Ubuntu Auto Install

This allows user to do automated installation of ubuntu. Provided here a a few different files/scripts for making this easier.

I've used this to verify that d-i kernel and initramfs from -proposed work as shown in bug 1511497.

The provided 'preseed' below can be used as a fully automated installation of ubuntu. Boot with qemu like:

note python web server is useful for this (python -m SimpleHTTPServer 9999)

@tai271828
tai271828 / README.md
Created October 12, 2020 17:14 — forked from smoser/README.md
ubuntu-auto-install: install a ubuntu image with kvm

Ubuntu Auto Install

This allows user to do automated installation of ubuntu. Provided here a a few different files/scripts for making this easier.

I've used this to verify that d-i kernel and initramfs from -proposed work as shown in bug 1511497.

The provided 'preseed' below can be used as a fully automated installation of ubuntu. Boot with qemu like:

note python web server is useful for this (python -m SimpleHTTPServer 9999)

@tai271828
tai271828 / README.md
Created October 22, 2020 13:31 — forked from smoser/README.md
update or add to an initramfs or initrd with contents of a directory

Update an initramfs with contents of a directory without root

This tool allows you to take a initramfs and add contents of a directory to it. This is very useful if you need to test initramfs, you can simply take the original and add your files "over".

Also, because it does not extract the original cpio archive, it works without root.

Usage:

Usage: overlay-initramfs [ options ] source-initramfs directory [output]

@tai271828
tai271828 / Pipfile
Last active November 6, 2020 20:34
flask-cookbook - code snippet collection of flask examples
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
[requires]
@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 / 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 / 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 桌面發行版。

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