Skip to content

Instantly share code, notes, and snippets.

View op8867555's full-sized avatar

Alex Lu op8867555

  • Taipei, Taiwan
View GitHub Profile
@op8867555
op8867555 / sidenote.lua
Created October 30, 2021 12:50 — forked from tarleb/sidenote.lua
Reimplementation of pandoc-sitenote by @jez as Lua filter
local counter = 0
function make_label(nonu)
local label_class = 'margin-toggle' .. (nonu and '' or ' sidenote-number')
local label_sym = nonu and '⊕' or ''
local label_html = string.format(
'<label for="sn-%d" class="%s">%s</label>',
counter,
label_class,
label_sym
/* Xft.dpi: 180 */
XTerm*locale: true
XTerm*reverseVideo: on
xterm*faceName: Source Code Pro
xterm*faceNameDoublesize: Source Han Sans
XTerm*metaSendsEscape: true
xterm*termName: xterm-256color
xterm*faceSize: 12
call plug#begin('~/.vim/plugged')
Plug 'editorconfig/editorconfig-vim'
" Status
Plug 'bling/vim-airline'
Plug 'lilydjwg/fcitx.vim'
" Bars, panels, and files
Plug 'scrooloose/nerdtree'
" Plug 'bling/vim-airline'
@op8867555
op8867555 / atapl-contents.txt
Last active August 6, 2018 15:23
The contents of the TaPL/ATaPL book in jPDF Tweak bookmark format.
1;;Advanced Topics in Types and Programming Languages;1
2;;Preface;10
2;;I Precise Type Analyses;16
3;;1 Substructural Type Systems;18
4;;1.1 Structural Properties;19
4;;1.2 A Linear Type System;21
4;;1.3 Extensions and Variations;32
4;;1.4 An Ordered Type System;45
4;;1.5 Further Applications;51
4;;1.6 Notes;55
@op8867555
op8867555 / reverse_ad.py
Created January 28, 2018 12:27
Reverse-Mode Autodiff
from collections import OrderedDict, Iterable
import math
from itertools import chain
import operator as ops
class Var:
def __init__(self, v):
self.v = v
self.ss = 0
@op8867555
op8867555 / coscup2017.vg.json
Created August 11, 2017 01:59
COSCUP 2017 議程表 in VEGA
{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"width": 480,
"height": 1600,
"padding": 50,
"data":[
{ "name": "table",
"url": "https://coscup.org/2017-assets/json/submissions.json",
"format": {"type":"json", "parse":{"start":"date", "end": "date"}},
"transform": [
@op8867555
op8867555 / hhkb.sh
Last active April 26, 2016 01:20
turn off ctrl:swapcaps for HHKB on the fly
setxkbmap -device $(xinput list --id-only 'Chicony PFU-65 USB Keyboard') us -option
@op8867555
op8867555 / numerical-reference.hs
Last active August 29, 2015 14:18 — forked from jkr/numerical-reference.hs
remove unused counter when going to upper level
{-# LANGUAGE PatternGuards #-}
{- This filter allows for numerical section references. It should be
used with "--number-sections", since it uses a similar numbering
scheme. It works by using the link notation: given a header with a
given id, we can refer to that number by using a link with `#` in it:
My Header {#my-header-id}
=========
@op8867555
op8867555 / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@op8867555
op8867555 / input.lua.patch
Created June 28, 2014 03:41
don't starve ( linux ) xbox 360 controller prompt dirty hack
--- input.lua.bak 2014-06-28 10:13:51.897841317 +0800
+++ input.lua 2014-06-28 11:38:07.049859004 +0800
@@ -295,6 +295,10 @@
if not (nil == intParam) then
text = string.format(text, intParam)
end
+
+ for key, rename in pairs(STRINGS.UI.CONTROLSSCREEN.GENERIC_CONTROLLER_RENAMES) do
+ text = string.gsub(text, key, rename)
+ end