Skip to content

Instantly share code, notes, and snippets.

View Des-Nerger's full-sized avatar

Des-Nerger

View GitHub Profile
#if OPENGL
#define SV_POSITION POSITION
#define VS_SHADERMODEL vs_3_0
#define PS_SHADERMODEL ps_3_0
#else
#define VS_SHADERMODEL vs_4_0_level_9_1
#define PS_SHADERMODEL ps_4_0_level_9_1
#endif
float xBlurDistance;
# -*- coding: UTF-8 -*-
# integrate cangjie5 into ibus-anthy
# USAGE: $ python2.7 export_cangjie5codes_to_ibus-anthy.py <libcangjie-1.2/data/table.txt >>~/.anthy/private_words_default
# after that, you need ibus-anthy to reload it somehow. I personally do it by starting kasumi and pressing the "Save" button.
import os, sys
from os import path
pkg_data_dir='/usr/share/ibus-anthy'
sys.path.append(path.join(pkg_data_dir, 'setup'))
from anthyprefs import AnthyPrefs
sys.path.append(path.join(pkg_data_dir, 'engine'))
/*
USAGE:
$ go run generate_multibyte_range_for_grep.go '"[0-9] 123-345"' #regex for greping numbers from 123 to 345 inclusively
2[0-9][0-9]|1[3-9][0-9]|12[3-9]|3[0-3][0-9]|34[0-5]
$ go run generate_multibyte_range_for_grep.go '"[\x80-\xBF] \u4E00-\u9FFC"' #regex to grep -P kanjis from 一 to 鿼
[\xE5-\xE8][\x80-\xBF][\x80-\xBF]|\xE4[\xB8-\xBF][\x80-\xBF]|\xE9[\x80-\xBE][\x80-\xBF]|\xE9\xBF[\x80-\xBC]
*/
package main
import (
"fmt"