Skip to content

Instantly share code, notes, and snippets.

View alick's full-sized avatar
🏠
Working from home

Alick Zhao alick

🏠
Working from home
View GitHub Profile
sudo ln -s /usr/lib/jvm/openjfx/rt/lib/amd64/libglassgtk2.so /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-11.fc28.x86_64/jre/lib/amd64/
@t-8ch
t-8ch / Makefile
Created January 31, 2018 22:10
minimal mutter application with window management
CFLAGS=$(shell pkg-config --cflags libmutter-1) -Wl,-rpath,/usr/lib/mutter
LDLIBS=$(shell pkg-config --libs libmutter-1)
all: main
@cryzed
cryzed / fix-infinality.md
Last active April 30, 2024 22:01
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@idealhack
idealhack / ingress-passcode.js
Last active November 13, 2020 07:20 — forked from DragorWW/ingress-passcode.js
ingress passcode auto run
// disable iitc plugin if it's on
// go to https://www.ingress.com/intel
// open console and paste in the code below, press enter
// join https://t.me/passcodes for more passcodes
// add jquery
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
@alick
alick / isatap
Created April 14, 2016 20:05
Bring up IPv6 through ISATAP tunnel.
#!/bin/bash
# vim730: set tw=80 cc=+1:
# Bring up IPv6 through ISATAP tunnel.
version="1.0"
usage() {
cat <<EOF
USAGE:
@MaskRay
MaskRay / update-charmaps-UTF-8.py
Last active June 7, 2018 07:56
set widths of codepoints : /usr/share/i18n/charmaps/UTF-8.gz
#!/usr/bin/env python3
import gzip, re, subprocess
def encode(x):
return '<U{:08X}>'.format(x)
width = {}
mx = 0
is_width = False
@alick
alick / replace-song-yahei-courier-fonts
Created October 25, 2015 15:07
User style for Chinese websites to replace Songti, Microsoft Yahei, and Courier fonts to alternatives on Linux.
@-moz-document regexp('https?://.*\\.cn/.*'), regexp('https?://dict.youdao.com/.*') {
@font-face {font-family:'宋体';src: local('Source Han Sans CN Normal');}
@font-face {font-family:'SimSun';src: local('Source Han Sans CN Normal');}
@font-face {font-family:'新宋体';src: local('Source Han Sans CN Normal');}
@font-face {font-family:'NSimSun';src: local('Source Han Sans CN Normal');}
@font-face {font-family:'微软雅黑';src: local('Source Han Sans CN Normal');}
@font-face {font-family:'Microsoft YaHei';src: local('Source Han Sans CN Normal');}
@font-face {font-family:'Courier New';src: local('monospace');}
@font-face {font-family:'Courier';src: local('monospace');}
}
@bigeagle
bigeagle / tunet.sh
Last active March 11, 2016 03:50
tunet.sh
#!/bin/bash
USER="username"
PASSWORD="password"
PASSWORD=`echo -n $PASSWORD|md5sum|cut -d' ' -f1`
curl 'https://net.tsinghua.edu.cn/do_login.php' -X 'POST' -H 'Origin: http://net.tsinghua.edu.cn' \
--data "action=login&username=${USER}&password={MD5_HEX}${PASSWORD}&ac_id=1"
@cyio
cyio / README.md
Last active January 9, 2021 02:55
【用户脚本】国内视频网站自动调用HTML5播放器

这是一个油猴脚本,代码引用自zythum/mama2,我(Oaker)只是搬运。

功能:访问国内主流视频网站时,自动调用HTML播放器。暂时只做了初步的网址匹配。

@jjgod
jjgod / 0001-Fix-CID-keyed-fonts-glyph-lookup.patch
Last active March 3, 2019 11:25
Patch to dvipdfm-x for CID-keyed font support
From 759df18a9c8ec05c6830687682c57d9e4c6a55d3 Mon Sep 17 00:00:00 2001
From: Jiang Jiang <gzjjgod@gmail.com>
Date: Sat, 26 Jul 2014 21:33:19 +0200
Subject: [PATCH 1/3] Fix CID-keyed fonts glyph lookup
Keep cff_charsets parsed from CID font around if exists. Use the
cff_charsets to do GID -> CID lookup.
---
texk/dvipdfm-x/cff.c | 14 ++++++++------
texk/dvipdfm-x/cff.h | 1 +