Skip to content

Instantly share code, notes, and snippets.

View medicalwei's full-sized avatar

Yao Wei medicalwei

View GitHub Profile
@medicalwei
medicalwei / gist:a1657f6c88ce6bd3d94ca08243c81d97
Created November 28, 2021 08:07
alvr missing libs from ldd on ubuntu 20.04 2021-11-28
mwei@hostname:/usr/lib64/alvr$ ldd libavcodec.so.58
linux-vdso.so.1 (0x00007ffc0fb64000)
libavutil.so.56 => not found
libx264.so.160 => not found
libx265.so.192 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f45c0bc0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f45c09ce000)
/lib64/ld-linux-x86-64.so.2 (0x00007f45c0c5e000)
mwei@hostname:/usr/lib64/alvr$ ldd libavfilter.so.7
linux-vdso.so.1 (0x00007ffc4c1a1000)
@medicalwei
medicalwei / gist:2922067
Created June 13, 2012 05:38
default hanzi font list
/usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing TW MBE:style=Light
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai CN:style=Book
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai HK:style=Book
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai TW:style=Book
/usr/share/fonts/truetype/arphic-bkai00mp/bkai00mp.ttf: AR PL KaitiM Big5,文鼎PL中楷:style=Regular
/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf: AR PL KaitiM GB,文鼎PL简中楷:style=Regular
/usr/share/fonts/truetype/arphic-gbsn00lp/gbsn00lp.ttf: AR PL SungtiL GB,文鼎PL简报宋:style=Regular
/usr/share/fonts/truetype/arphic-bsmi00lp/bsmi00lp.ttf: AR PL Mingti2L Big5,文鼎PL細上海宋:style=Reguler,Regular
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai TW MBE:style=Book
/usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing TW:style=Light
@medicalwei
medicalwei / Dockerfile
Last active January 19, 2020 18:16
Example Dockerfile with Glide
FROM golang:1.8
RUN curl https://glide.sh/get | sh
ENV PKG_NAME=github.com/medicalwei/some-project
ENV PKG_PATH=$GOPATH/src/$PKG_NAME
WORKDIR $PKG_PATH
COPY glide.yaml glide.lock $PKG_PATH/
RUN glide install
" goodbye vi
set nocompatible
" plug
filetype off
call plug#begin('~/.vim/plugged')
" Git
Plug 'tpope/vim-fugitive'
@medicalwei
medicalwei / sequencer.ino
Created August 5, 2013 01:39
Arduino Esplora Sequencer
#include <Esplora.h>
#include <TFT.h>
#include <SPI.h>
// these are the frequencies for the notes from middle C
// to one octave above middle C:
const int note[] = {
247,
262, // C
@medicalwei
medicalwei / A
Created September 17, 2017 02:15
Makefile dependency example
This is file A
@medicalwei
medicalwei / vimrc
Created September 11, 2017 02:31
vimrc
" goodbye vi
set nocompatible
" plug
filetype off
call plug#begin('~/.vim/plugged')
" Git
Plug 'tpope/vim-fugitive'
http://ichrisi.bizhat.com/custom_js/picross_play.html?29.29|ZurNZ11Yj6UNfFHPgEmqFTIIKjf51ZEEFY0mjK2Yp5eAC3xqgWRN0cwDqEuN10owH1X4wAnkznv3bDYTOlg9XTPFSXe9nwvx_MQPYS1Sg7ZSoAIfjkqiIH1JHrqRhYUQOtO4W3EJVbjs0
Hint: QR Code
---
7 2 2 6 7
1 1 1 1 1 1 1
1 3 1 1 1 2 3 1 3 1
1 3 1 3 1 2 1 3 1
00000000: c2af c2ba c29a 6966 4b2f 45c3 be69 c2ab ......ifK/E..i..
00000010: c298 395e 3151 c296 2a51 c293 0074 2b56 ..9^1Q..*Q...t+V
00000020: 3dc3 a90b 2fc3 98c2 b9c2 bec3 9f57 26c3 =.../........W&.
00000030: 8dc2 a008 2f0c c2ad 5fc3 bcc3 bac3 a9c2 ..../..._.......
00000040: 9556 1103 3f71 c387 c3b5 c283 c3af 66c3 .V..?q........f.
00000050: a546 c3ae c397 c3ab 22c2 b7c3 a03d 71c3 .F......"....=q.
00000060: a9c3 83c3 871a c2a4 c295 c2ac 5bc2 9bc2 ............[...
00000070: 870c 7a1d c2a8 2a1a c2a5 1e17 5a04 c2a3 ..z...*.....Z...
00000080: c2a2 c3a9 75c3 b65c 35c2 a96b c2af c28f ....u..\5..k....
00000090: c3a6 c28f 4c43 0a ....LC.
# -*- coding: utf-8 -*-
import sys
import urllib
import fontforge
import psMat
BASE_FONT = "TW-Kai-98_1.ttf"
IDS_URL = "https://tools.wmflabs.org/idsgen/%s.svg?字體=%s"
IDS_FONT = "楷體"