Skip to content

Instantly share code, notes, and snippets.

View nanzhong's full-sized avatar
👋

Nan Zhong nanzhong

👋
View GitHub Profile
@nanzhong
nanzhong / copic.rb
Created November 29, 2020 17:36
Copic Colours
require 'json'
require 'open-uri'
colours = {}
URI.open("https://copic.jp/en/about/color_system/") do |f|
matches = f.read.scan(/<td class="c_([a-fA-F0-9]{6})">(?:<span>)?([\w-]+)/)
matches.each do |hex, name|
colours[name] = "##{hex}"
end
end
@nanzhong
nanzhong / build_emacs.log
Created June 16, 2023 12:43
nixpkgs emacs build hang
checking outputs of '/nix/store/xmjcy0ssrzsd3ix1vjg00b47ycyf9hpq-emacs-28.2.drv'...
emacs> unpacking sources
emacs> unpacking source archive /nix/store/833xz3irmdc8c87pdda1x49nn3lv5ys1-source
emacs> source root is source
emacs> patching sources
emacs> applying patch /nix/store/k5jvffv0s3gq3pnfmz9wvixnhwy5l2l6-native-comp-driver-options-28.patch
emacs> patching file lisp/emacs-lisp/comp.el
emacs> substituteStream(): WARNING: pattern '/bin/pwd' doesn't match anything in file './lisp/Makefile.in'
emacs> substituteStream(): WARNING: pattern '/bin/pwd' doesn't match anything in file './test/Makefile.in'
emacs> substituteStream(): WARNING: pattern '/bin/pwd' doesn't match anything in file './msdos/autogen/Makefile.in'
@nanzhong
nanzhong / .emacs
Last active April 19, 2022 15:00
hl-line-mode + projectile slow down
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
typed text:
',.pyfgcrl/=\
| n | type | code | key | kc | mods | repeat | l | comp | iType | data |
|---:|------------:|-------------:|:----|----:|-----:|-------:|--:|-----:|-----------:|-----:|
| 1 | keydown | KeyQ | ' | 222 | | | 0 | | | |
| 2 | beforeinput | | | | | | | | insertText | ' |
| 3 | input | | | | | | | | insertText | ' |
| 4 | keyup | KeyQ | ' | 222 | | | 0 | | | |

Keybase proof

I hereby claim:

  • I am nanzhong on github.
  • I am nan (https://keybase.io/nan) on keybase.
  • I have a public key ASD16p0T7NUzXNmYKKhb8jD4vha4wz-jzd2JDCEhLVkAMwo

To claim this, I am signing this object:

/*
This is a sample config for Kwm
Commands prefixed with 'kwmc' will call
local functions corresponding to the
kwmc syntax.
To run an external program or command,
use the prefix 'exec' followed by command.
e.g 'exec mvim' would open macvim
source 'https://rubygems.org'
gem 'json'
@nanzhong
nanzhong / file1
Created October 19, 2012 19:39
tests
test 1
test test test
@nanzhong
nanzhong / file1.txt
Created October 18, 2012 01:31 — forked from anonymous/file1.txt
test description
First file