Skip to content

Instantly share code, notes, and snippets.

View yangziy's full-sized avatar

Ziyang "Zion" Yang yangziy

  • Rice University
  • Houston
  • 22:52 (UTC -05:00)
View GitHub Profile
#!/bin/bash
interactive=
filename=~/sysinfo_page.html
while [ "$1" != "" ]; do
case $1 in
-f | --file ) shift
filename="$1"
;;
@yangziy
yangziy / debootstrap.sh
Last active February 23, 2023 21:37
Scripts for building root file systems for Linux development
qemu-img create -f raw rootfs.raw 100G
mkfs.ext4 rootfs.raw
mkdir rootfs
sudo mount rootfs.raw ./rootfs
sudo debootstrap \
--include apt,apt-utils \
--include isc-dhcp-client,iproute2,wget,curl \
--include git,vim,build-essential,gcc-multilib,g++-multilib \
focal ./rootfs http://archive.ubuntu.com/ubuntu/
@yangziy
yangziy / .login
Last active May 14, 2021 04:14
Remember last work directry
# ~/.login
# ~/.bash_login
cd `cat ~/.last_wd`