Skip to content

Instantly share code, notes, and snippets.

View motorailgun's full-sized avatar
🏠
Working from home

motorailgun motorailgun

🏠
Working from home
  • Japan
  • 08:24 (UTC +09:00)
View GitHub Profile
@motorailgun
motorailgun / Dockerfile
Created June 24, 2023 21:36
xv6-public dockerfile for make/make qemu
#based on: https://pdos.csail.mit.edu/6.828/2018/tools.html
FROM ubuntu:jammy-20230605
RUN ["apt", "update", "-y"]
RUN ["apt", "install", "-y", "build-essential", "m4", "libncurses5-dev"]
COPY ./tarballs /tarballs
WORKDIR /tarballs
RUN tar xjf gmp-5.0.2.tar.bz2; \
@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@motorailgun
motorailgun / Twitter_momentMediaDownloader.rb
Created January 26, 2021 00:11
Twitterのモーメントにある画像を保存するやつ
require "json"
raw_json = JSON[File.open(ARGV[0]){|file| file.read}]
tweets_list = raw_json["globalObjects"]["tweets"]
# tweets_orderはツイートIDのArray
tweets_order = raw_json["timeline"]["instructions"][0]["addEntries"]["entries"][1..].reduce(Array.new){|orderd_list, item|
if item["content"].has_key?("item") and item["content"]["item"]["content"].has_key?("tweet") then
orderd_list << (item["content"]["item"]["content"]["tweet"]["id"])
else
@motorailgun
motorailgun / fio.fio
Created January 10, 2021 15:20
Fio Benchmark Setting
[global]
ioengine=libaio
iodepth=1
size=2g
direct=1
runtime=60
directory=${TARGET}
stonewall