Skip to content

Instantly share code, notes, and snippets.

View nanzhong's full-sized avatar
👋

Nan Zhong nanzhong

👋
View GitHub Profile
@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 / 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
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:

@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))
/*
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
@nanzhong
nanzhong / gist:822fb551b9da6e67e1b0
Created February 22, 2015 04:58
Updated emacs theme
;;; monokai-theme.el --- A fruity color theme for Emacs.
;; Copyright (C) 2011-2013
;; Author: Kelvin Smith <oneKelvinSmith@gmail.com>
;; URL: http://github.com/oneKelvinSmith/monokai-emacs
;; Version: 0.2.0
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
production:
adapter: mysql2
encoding: utf8
database: <%= ENV['MYSQL_ENV_MYSQL_DATABASE'] %>
username: <%= ENV['MYSQL_ENV_MYSQL_USER'] %>
password: <%= ENV['MYSQL_ENV_MYSQL_PASSWORD'] %>
host: <%= ENV['MYSQL_PORT_3306_TCP_ADDR'] %>
port: <%= ENV['MYSQL_PORT_3306_TCP_PORT'] %>
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
FROM ruby:2.1.5
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
ENV SECRET_KEY_BASE 6dd899954289073958f13101a1903a8e
RUN bundle install
RUN apt-get update
RUN apt-get install -y nodejs --no-install-recommends
RUN apt-get install -y mysql-client --no-install-recommends
RUN rm -rf /var/lib/apt/lists/*