Skip to content

Instantly share code, notes, and snippets.

View AnthonyZJiang's full-sized avatar
🎓
Busy building robots 🤖

Anthony Jiang AnthonyZJiang

🎓
Busy building robots 🤖
View GitHub Profile

Install Ubuntu on an External USB Drive (Portable Ubuntu)

This guide explains how to install a full Ubuntu system on an external USB drive or SSD, so you can plug it into any compatible computer and boot into your own Ubuntu desktop, with full persistence and saved settings.

Key idea

The main challenge on UEFI systems is bootloader isolation: by default the installer may mess with the host system’s ESP (EFI System Partition). The trick is to temporarily hide the host’s ESP from the installer so it instead creates its own ESP directly on the USB.


@AnthonyZJiang
AnthonyZJiang / isaac_gym_ubuntu22.04.md
Last active February 22, 2026 02:28
Install Isaac Gym on ubuntu 22.04

1. Install Miniconda

mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
@AnthonyZJiang
AnthonyZJiang / Setup_byobu.sh
Last active July 2, 2025 23:05
byobu setup
byobu-enable
byobu-select-backend tmux
byobu-enable-prompt
. ~/.bashrc
@AnthonyZJiang
AnthonyZJiang / test_spinnaker_gain_value_retrieval.py
Created June 17, 2025 10:56
spinnaker gain value retrieval
import PySpin
NUM_IMAGES = 5
class GainNodeCallback(PySpin.NodeCallback):
def __init__(self):
super(GainNodeCallback, self).__init__()

Keybinding definition

byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used).

Window/layout shortcuts

Key Combination Action
F2 Create a new window
F3 Move to previous window
F4 Move to next window
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
@AnthonyZJiang
AnthonyZJiang / ros_node_publish_local_image.py
Last active March 27, 2025 21:42
ROS publish local image
#!/usr/bin/env python
import rospy
import cv2
from cv_bridge import CvBridge
from sensor_msgs.msg import Image, CompressedImage
def image_publisher():
rospy.init_node('local_image', anonymous=True)
@AnthonyZJiang
AnthonyZJiang / tmate.md
Last active November 23, 2024 19:42
Linux shell sharing

Tmate

https://tmate.io/

Setup steps

  1. Install tmate on the host machine
  2. Request an API key
  3. Follow instructions on the website to add API key information to .tmate.conf - Be sure to use a difficult session name as it is basically a plaintext password.
  4. Setup system service if the tmate session is to be started automatically as system starts
@AnthonyZJiang
AnthonyZJiang / extract_pdf.py
Created March 11, 2024 11:22
Python script to extract PDF files embedded in Microsoft Word *.docx files
import olefile
from zipfile import ZipFile
from glob import glob
# How many PDF documents have we saved
pdf_count = 0
# Loop through all the .docx files in the current folder
for filename in glob("*.docx"):
try:
@AnthonyZJiang
AnthonyZJiang / setup_wifi.sh
Created February 15, 2024 15:49
Set up internet access for bridged network for Parallels Desktop Ubuntu
#!/bin/bash
net_interf=enp0s5
vm_ip=192.168.7.172
gateway_ip=192.168.7.1
sudo ip address add ${vm_ip} dev ${net_interf}
sudo ip route add ${gateway_ip} dev ${net_interf}
sudo ip route add default via ${gateway_ip} dev ${net_interf}