Skip to content

Instantly share code, notes, and snippets.


QuantumGhost QuantumGhost

View GitHub Profile
View gooptions.go
package main
import "time"
type Client struct {
addr string
timeout time.Duration
View do-premium-amd.log
------------------------------------------------- v2019.07.20 --
benchmark timestamp: 2021-05-30 14:40:17 UTC
Processor: DO-Premium-AMD
CPU cores: 1
Frequency: 1999.947 MHz
RAM: 989Mi
Swap: -
View log_test.go
package temp
import (
QuantumGhost /
Created May 9, 2020
disable notarization on macOS Catalina

Catalina's notarization is a disaster for cli apps. You may like to disable it with the following command:

sudo spctl --master-disable

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

View uBlacklist.txt
QuantumGhost / DefaultKeyBinding.dict
Last active Dec 15, 2019 — forked from smilingpoplar/DefaultKeyBinding.dict
xcode keybindings for emacs emulation
View DefaultKeyBinding.dict
/* Override symbols so other apps can bind */
/* ~ stands for option, ^ stands for control */
"~j" = "noop:";
"~i" = "noop:";
"~;" = "noop:";
"~a" = "noop:";
"~2" = "noop:";
"~g" = "noop:";
"~y" = "noop:";
View http api and error

采取 RESTful 风格的 api 是否应该对结果包一层?

又是基于 HTTP 的 API 设计问题


  1. RESTful 和 RPC 风格各有优劣,具体场景具体分析,但是整体一致最重要,不一致的 API 始终是最糟糕的。

  2. 如果要添加错误码,错误码最好放在 HTTP 头里面,这样可以在不读取 payload 的情况下判断是否存在错误

    例如:X-Error-Code: 10001 或者 X-Error-Code: OUT_OF_CREDIT

QuantumGhost /
Created Oct 10, 2019 — forked from chrisdone/
Statically Typed Lisp

Basic unit type:

λ> replTy "()"
() :: ()

Basic functions:


Rust in Large Organizations

Initially taken by Niko Matsakis and lightly edited by Ryan Levick


  • Introductions
  • Cargo inside large build systems
  • FFI
  • Foundations and financial support