Skip to content

Instantly share code, notes, and snippets.

View phlinhng's full-sized avatar

phlinhng

  • Tsinghua University
  • Formosa
View GitHub Profile
@weakish
weakish / README
Created August 21, 2010 00:12
非一一映射簡繁漢字對照表
Collected from Internet, and coverted to UTF-8 via iconv.
@imginohu
imginohu / readlist_epub.css
Created June 29, 2013 06:13
Optimized css for epub exported by readability in NOOK Touch
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: normal;
font-style: normal;
src: url(res:///system/fonts/DroidSansFallback.ttf);
}
@font-face {
font-family: "DroidFont", serif, sans-serif;
font-weight: bold;
font-style: normal;
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
/*
-----------------------------------
Emoji - natural display for the web
-----------------------------------
These font face definitions allows to display emoji glyphs intermingled with
arbitrary characters outside emoji unicode blocks.
Usage
@muink
muink / clowwindy-is-right.md
Last active November 22, 2023 09:13
个人感觉shadowsocks作者说的很对的一句话

shadowsocks作者说的很对的一句话与感想

个人感想:

  • 中国人很投机, 包括本人在部分情况下也是投机者. 总想不劳而获, 抄袭他人劳动成果. 想想我们学生时代的抄袭作弊之风盛行便可知... (然而为什么会这样)
  • "土皇帝"情节, 因自己在某方面上比别人强, 听听粉丝的追捧, 就觉得自己不可一世, 比别人优越, 殊不知人外有人山外有山, 而且自己在其他方面也有不如他人的地方. (然而为什么会这样)
  • 家长情节 总想要一个"家长"来管理一切, 把应该由自己解决的问题抛给别人"包办解决", 图一时之便. 久而久之结果就是并不了解你一切的"家长""包办解决"你的一切, 而你却失去了基本的思考解决问题能力, 看不到目标, 找不到方法, 只好任由"家长"摆布. 这种"爱"是现实的囚笼. (然而为什么会这样)

原文内容:

!function go() {
return $('#grid div')
.get()
.map(function(div) { return {v:div.innerText|0,div:div} })
.filter(function(box) { return box.v })
.sort(function(a,b) { return a.v - b.v })
.reduce(function(p,box) {
return p.then(function() {
return new Promise(function(resolve, reject) {
$(box.div).trigger('tap')
@manabuyasuda
manabuyasuda / Noto-Sans-Jp.md
Last active May 26, 2024 06:26
Noto Sans JPを使うための手順。

Noto Sans JP

Noto Sans JPをWebサイトで使う場合、大きく分けて2つの方法があります。

  1. CDNを使う場合
  2. サーバーにフォントファイルを置く場合

CDNの場合は、他のサイトを含めて一度でも読み込まれていればブラウザ側でキャッシュを持っているので、読み込み速度が速くなることが期待できます。
サーバーのフォントファイルはサブセット化(不要なデータを削除すること)でファイルサイズを削減できるメリットがあります。

基本的にはCDNを利用して、フォールバックとしてサーバーに置いたフォントファイルとシステムフォントを指定するのがいいでしょう。

@hoksea
hoksea / JS -- change font size & chinese trad simpl
Last active November 4, 2023 13:15
【JS】字號縮放 & 繁簡轉換
All the codes below are collected from the Internet. Gathering below just for easy reference.
@oskar456
oskar456 / wgcf.py
Last active February 17, 2024 12:47
Cloudflare WARP linux client (using wg-quick for actual tunnel setup)
#!/usr/bin/env python3
import subprocess
import json
import os
from pathlib import Path
import requests
from requests.compat import urljoin