Skip to content

Instantly share code, notes, and snippets.

View chenwaichung's full-sized avatar
🎯
Focusing

Jim chenwaichung

🎯
Focusing
View GitHub Profile
@chenwaichung
chenwaichung / ComPort over Network.md
Created October 27, 2023 15:46 — forked from DraTeots/ComPort over Network.md
ComPort over Network
@chenwaichung
chenwaichung / arm64-on-Win10.md
Created April 19, 2023 13:49 — forked from billti/arm64-on-Win10.md
ARM64 Linux on Win10

Below are the steps to get an ARM64 version of Ubuntu running in the QEMU emulator on Windows 10.

Install QEMU

Install for Windows from https://qemu.weilnetz.de/w64/ (I used qemu-w64-setup-20181211.exe)

Put C:\Program Files\qemu on your PATH, and run the below to check it's working (which will list out the CPUs the AArch64 emulator can emulate):

qemu-system-aarch64 -M virt -cpu help
@chenwaichung
chenwaichung / git_ssh_proxy.md
Created July 22, 2022 07:45 — forked from chenshengzhi/git_ssh_proxy.md
git ssh 代理设置

仅为 GitHub 设置代理

git 代理

设置 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig 文件中会增加以下条目:

[http "https://github.com"]
    proxy = socks5://127.0.0.1:1086
@chenwaichung
chenwaichung / client.go
Created June 14, 2019 01:31 — forked from elico/client.go
golang tcp client connection alive check
package main
import (
"fmt"
"io"
"net"
"time"
)
func main() {
@chenwaichung
chenwaichung / check_home_var.sh
Created May 10, 2019 07:33
check env home is set
#!/bin/bash
if [ -z "$HOME" ]
then
echo "\$HOME is empty"
else
echo "\$HOME is NOT empty"
fi
@chenwaichung
chenwaichung / check_deb_pkg_installed.sh
Created May 9, 2019 10:42
use dpkg-query check package is installed?
#!/bin/bash
pkgs=automake
if dpkg-query -l ${pkgs} >/dev/null 2>&1; then
echo "${pkgs} is installed."
else
echo "${pkgs} not installed."
fi
@chenwaichung
chenwaichung / check.go
Created May 7, 2019 13:35 — forked from mattes/check.go
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}
@chenwaichung
chenwaichung / coreos-virtualbox.md
Last active March 19, 2019 02:08 — forked from noonat/coreos-virtualbox.md
Installing CoreOS on VirtualBox
  • Download and install VirtualBox.
  • Download the CoreOS amd64 ISO
  • Create a new VM in VirtualBox
    • For the OS, Other Linux, 64-bit should be fine
    • Give the VM 1gb of memory, like your physical hardware has.
    • Create a disk of whatever size you want. I made a VMDK file that could expand dynamically up to 8gb.
  • Mount the ISO in the VM
    • Right click on the VM and click settings
  • Go to the storage tab