Skip to content

Instantly share code, notes, and snippets.

View RigoLigoRLC's full-sized avatar
😉
Working on something big

Wu Haotian RigoLigoRLC

😉
Working on something big
View GitHub Profile
@shingchi
shingchi / Unicode中文和特殊字符的编码范围
Created January 6, 2015 06:39
Unicode中文和特殊字符的编码范围
根据Unicode5.0整理如下:
1)标准CJK文字
http://www.unicode.org/Public/UNIDATA/Unihan.html
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF
http://www.unicode.org/charts/PDF/UFF00.pdf
3)CJK部首补充:2E80-2EFF
http://www.unicode.org/charts/PDF/U2E80.pdf
@statico
statico / gpu.cpp
Last active January 25, 2024 01:06
Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
#ifdef _WIN32
// Use discrete GPU by default.
extern "C" {
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
@omarmiatello
omarmiatello / EasyWS.kt
Last active June 4, 2024 13:37
First experiment with WebSocket and Kotlin Coroutine
import kotlinx.coroutines.experimental.CommonPool
import kotlinx.coroutines.experimental.channels.Channel
import kotlinx.coroutines.experimental.launch
import okhttp3.*
import okio.ByteString
import kotlin.coroutines.experimental.suspendCoroutine
/**
* Created by omarmiatello on 17/06/17.
*/
@schnell18
schnell18 / pip_mirror.sh
Last active January 19, 2024 10:53
setup pip mirror in China
mkdir ~/.pip
cat <<EOF > ~/.pip/pip.conf
[global]
trusted-host = mirrors.aliyun.com
index-url = http://mirrors.aliyun.com/pypi/simple
EOF
Update note: Linux kernel commit feb627e8d6f69c9a319fe279710959efb3eba873
breaks this patch and will need to be reverted in order for this to work on
kernels starting with 5.16.
From 28e67537895c4b46b9721f19609ee4f2ccb8c132 Mon Sep 17 00:00:00 2001
From: pi <secret@hidden.mail>
Date: Sat, 7 Nov 2020 18:41:42 +0100
Subject: [PATCH] Add 'hide-hypervisor' QMP command
CAUTION: Extremely hacky stuff below. Use at own risk of bugs, breakage and