Skip to content

Instantly share code, notes, and snippets.

View SimonLeeGit's full-sized avatar

SimonLee SimonLeeGit

View GitHub Profile
@SimonLeeGit
SimonLeeGit / build_protobuf_for_android.md
Created March 7, 2024 12:58
How to build protobuf for android

How to build protobuf for android

For game development, protobuf is very useful for network message protocal. For mobile android platform, we need the libs for android. But we can not find the tutorial about the build step for android platform. Here I show a way about this.

Install Android NDK and SDK

You can download and install android studio. Then install the sdk and ndk for you need.

Create a Standalone Toolchain (optional)

@SimonLeeGit
SimonLeeGit / vscode_download_slow.md
Last active November 5, 2021 02:43
download vscode from ms official slowly.

First click on the official download, in the Firefox's Downloads list, click Right click to select Copy Download Link, for example,

https://az764295.vo.msecnd.net/stable/8490d3dde47c57ba65ec40dd192d014fd2113496/code_1.53.0-1612368357_amd64.deb Replace the above link https://az764295.vo.msecnd.net with http://vscode.cdn.azure.cn, that is, the replacement download link is,

http://vscode.cdn.azure.cn/stable/8490d3dde47c57ba65ec40dd192d014fd2113496/code_1.53.0-1612368357_amd64.deb Open this new link directly in the browser address bar, you can download it quickly!

@SimonLeeGit
SimonLeeGit / run_unreal_project.bat
Created October 20, 2021 11:29
run unreal editor with project in windows
set DIR=%~dp0
set PROJECT_NAME=AgentSim
set PLATFORM_NAME=Win64
set ENGINE_PATH=%DIR%\..\UnrealEngine
set RUN_CMD="%ENGINE_PATH%\Engine\Binaries\%PLATFORM_NAME%\UE4Editor.exe"
set PROJECT_FILE="%DIR%\%PROJECT_NAME%.uproject"
::start "Client" %RUN_CMD% %PROJECT_FILE% ?RosIP=192.168.1.5?RosPort=15000? -game -log -windowed
@SimonLeeGit
SimonLeeGit / run_unreal_project.sh
Created October 20, 2021 11:28
run unreal editor with project in linux
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_NAME="AgentSim"
ENGINE_PATH="${DIR}/../UnrealEngine"
PLATFORM_NAME="Linux"
SCRIPT_DIR="${ENGINE_PATH}/Engine/Build/BatchFiles"
if [ "$(uname)" = "Darwin" ]; then
@SimonLeeGit
SimonLeeGit / update_download_pub_key.md
Last active June 11, 2024 07:57
由于没有公钥,无法验证下列签名

由于没有公钥,无法验证下列签名

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 46B5721DBBD2996A
@SimonLeeGit
SimonLeeGit / top_threads.sh
Created September 11, 2021 08:11
use top to show threads cpu usage
top -H -p [pid]
@SimonLeeGit
SimonLeeGit / read_file_lines.sh
Created September 3, 2021 06:18
How to read file line by line in Bash script
$ while read line; do echo $line; done < company.txt
@SimonLeeGit
SimonLeeGit / disk_checker.sh
Created June 25, 2021 06:51
disk check commands
# list the size for all files and folders.
du -h --max-depth=1
# list all disk and usage.
df -lh
@SimonLeeGit
SimonLeeGit / python_config.sh
Last active September 3, 2021 14:19
How to config different python version and switch them
# 切换python的版本
sudo update-alternatives --config python
# 配置使用的python各个版本的链接
# python2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.4 5
# python3
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 5
@SimonLeeGit
SimonLeeGit / get_latest_release.sh
Created May 16, 2021 03:53
get github release info by api
curl --silent "https://api.github.com/repos/$1/releases/latest"
# Usage
# $ bash get_latest_release.sh "carla-simulator/carla"