Skip to content

Instantly share code, notes, and snippets.

View KuanYuChang's full-sized avatar

Kuan-Yu Chang KuanYuChang

  • ASMedia Technology Inc.
  • Taipei, Taiwan
  • 16:49 (UTC +08:00)
View GitHub Profile
@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 / 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 / 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 / setup-noreward-rl.bash
Last active March 19, 2021 03:27
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
WORKSPACE=$(pwd)
git clone https://github.com/pathak22/noreward-rl
git clone https://github.com/openai/go-vncdriver
@KuanYuChang
KuanYuChang / InPrivateEdge.reg
Last active August 21, 2020 23:04
Force Edge to run in InPrivate mode
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"InPrivateModeAvailability"=dword:00000002
@KuanYuChang
KuanYuChang / down_line.sh
Last active April 8, 2020 02:28
Save LINE sticker packages by ID; prerequisite: unzip, imagemagick
#!/bin/bash
ID=$1
ZIP="https://stickershop.line-scdn.net/stickershop/v1/product/${ID}/android/stickers.zip"
ICON="https://stickershop.line-scdn.net/stickershop/v1/product/${ID}/LINEStorePC/main.png"
DIR="${HOME}/line/${ID}"
echo LINE store: https://store.line.me/stickershop/product/${ID}
if [ -d "${DIR}" ]; then
@KuanYuChang
KuanYuChang / IncognitoChrome.reg
Created February 23, 2020 18:37
Open Google Chrome with Incognito mode by default
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Google\Chrome]
"IncognitoModeAvailability"=dword:00000002
@KuanYuChang
KuanYuChang / configuration-Office365-x64.xml
Last active April 14, 2024 19:37
Configuration of Office Deployment Tool
<!-- Office 365 client configuration file.
For detailed information regarding configuration options visit: http://aka.ms/ODT.
To use the configuration file be sure to remove the comments.
Download Office Deployment Tool: https://www.microsoft.com/en-us/download/details.aspx?id=49117
Installation command: .\setup.exe /configure .\configuration-Office365-x64.xml -->
<Configuration>
<Add OfficeClientEdition="64">
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
@KuanYuChang
KuanYuChang / adduser.go
Last active October 30, 2019 17:44
add a new user to filebrowser v1.10.0. Link: https://github.com/filebrowser/filebrowser
package main
import "os"
import "fmt"
import "strings"
import "github.com/hacdias/fileutils"
import "github.com/asdine/storm"
import fb "github.com/filebrowser/filebrowser/lib"
import "github.com/filebrowser/filebrowser/lib/bolt"
@KuanYuChang
KuanYuChang / plot_conic_sections.m
Created May 31, 2018 13:28
plotting two examples of conic sections
figure;
subplot(2, 2, 1);
fimplicit(@(x, y) (x.^2) - x.*y + (y.^2) - sqrt(2).*x + 2*sqrt(2).*y - 4, [-5 5 -5 5]);
grid on; title('ex1-origin');
subplot(2, 2, 2);
fimplicit(@(x, y) (x.^2) - x.*y + (y.^2) - 6, [-5 5 -5 5]);
grid on; title('ex1-translation');
subplot(2, 2, 3);