Skip to content

Instantly share code, notes, and snippets.

View mk2s's full-sized avatar

Maki Kato mk2s

View GitHub Profile
@kokokodak
kokokodak / gist:4bf0d76616635b46b2682a6371dd8b58
Last active March 7, 2023 04:00
OpenBSD - disable library rebuild on every boot
This setting is quite useful on slow machines where security is not very important.
# rcctl disable library_aslr
@lmazuel
lmazuel / cred_wrapper.py
Last active June 5, 2024 15:53
Use azure-identity to authenticate mgmt SDKs that needs "msrestazure/azure.common.credentials" protocol
# Wrap credentials from azure-identity to be compatible with SDK that needs msrestazure or azure.common.credentials
# Need msrest >= 0.6.0
# See also https://pypi.org/project/azure-identity/
from msrest.authentication import BasicTokenAuthentication
from azure.core.pipeline.policies import BearerTokenCredentialPolicy
from azure.core.pipeline import PipelineRequest, PipelineContext
from azure.core.pipeline.transport import HttpRequest
@ravecat
ravecat / README.md
Last active May 4, 2024 01:18
debootstrap, livecd

A live CD or live DVD is a complete bootable Linux operating system loaded from a CD or DVD. Although there are a lots of live Linux CDs, for seemingly every taste and purpose, it might still be useful on occasion to build your own. This guide details the steps to build a bootable live CD/DVD based on Debian “wheezy”.

Step 1 – Installing the necessary software

These are the software packages you need to install on your Debian system:

apt-get install xorriso live-build syslinux squashfs-tools

Step 2 – Create a basic filesystem

@jperkin
jperkin / edgerouter.md
Last active March 25, 2024 13:22
OpenBSD/octeon EdgeRouter Lite

This is a nifty little device for under £100 suitable for a home router.

I am using one running OpenBSD 6.8 for my AAISP PPPoE connection (avoiding the supplied VMG1312-B10A which has a number of issues).

Installation

I bought a SanDisk 16GB USB stick as there were reports the supplied USB stick isn't particularly reliable, plus it's nice to keep it separate in case of backup or selling the device in the future.

Download the OpenBSD miniroot68.img file system and dd(1) it, for example on macOS (assuming /dev/disk2):

@cb372
cb372 / riscv.md
Last active June 8, 2024 10:09
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.

PROCESSOR Z80
ORG 0000H
JP XPCOLD
ORG 0038H
JP INT0INT
;
; XXX: CP/M common part is included here
;
@giuliohome
giuliohome / io.fsx
Created June 6, 2017 15:15 — forked from battermann/io.fsx
IO Monad in F#
[<AutoOpen>]
module IO =
type IO<'a> =
private
| Return of (unit -> 'a)
| Suspend of (unit -> IO<'a>)
let rec run x =
match x with
| Return v -> v()
(C) Copyright Omron Corporation 1989, 1990
ROM Version 1.20, 64 Megabytes RAM, 3 CPUs
Memory Check: 3Port passed, main skipped.
ROM Monitor
0>install
start install booting...
CPU0 is attached with MC88200 CMMU
CPU1 is attached with MC88200 CMMU
CPU2 is attached with MC88200 CMMU
ROOT device is the ramdisk system.
@jorritfolmer
jorritfolmer / qemu-kvm-ovirt-windows-server-2016.md
Last active June 8, 2021 20:25
Installing Windows Server 2016 on oVirt qemu/kvm

Installing Windows Server 2016 on Ovirt v4 qemu/kvm

The install fails with BSOD and "Your PC ran into a problem and needs to restart. We're just collecting some error info, and then we'll restart for you."

Windows installer BSOD on qemu/kvm

After reboot it returns with the following message: "The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click OK to restart the computer, and then restart the installation.":

Windows installer restarted unexpectedly on qemu/kvm

/play
/*.png
/*.bmp
/solitaire