Skip to content

Instantly share code, notes, and snippets.

View KuanYuChang's full-sized avatar

Kuan-Yu Chang KuanYuChang

  • ASMedia Technology Inc.
  • Taipei, Taiwan
  • 14:08 (UTC +08:00)
View GitHub Profile
@KuanYuChang
KuanYuChang / build-densepose.bash
Last active March 19, 2021 03:25
Tested on Giselle
#!/usr/bin/env bash
# Cause the script to exit on any errors
# Reference: https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -eo pipefail
# use CUDA 9.0
chcuda 9.0
# common variables
@KuanYuChang
KuanYuChang / build-protobuf.bash
Created March 19, 2021 03:39
Tested on Giselle
#!/usr/bin/env bash
# Cause the script to exit on any errors
# Reference: https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -euo pipefail
# install dependencies
sudo apt install autoconf automake libtool curl make g++ unzip
# clone git repo
@KuanYuChang
KuanYuChang / building_flow_of_leveldb.sh
Last active December 23, 2021 06:21
Minimal Work Example of building program with LevelDB
# If using macOS, please first install Command-Line Tools, Homebrew, and cmake via the following commands:
# $ xcode-select --install
# $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# $ brew install cmake
# declear vars
WORK_SPACE=$(pwd)
REPO_DIR=${WORK_SPACE}/remote_repo
PROJECT_DIR=${WORK_SPACE}/my_project
@KuanYuChang
KuanYuChang / cvsvimdiff
Last active September 19, 2025 03:18
A script that uses vimdiff to review differences in the working file
#!/usr/bin/env bash
vimdiff="vimdiff"
cvs_rev="HEAD"
################################################################################
# Process input arguments
################################################################################
if [ "$1" == "-h" ]; then