Skip to content

Instantly share code, notes, and snippets.

View QuantumGhost's full-sized avatar
🎯

QuantumGhost QuantumGhost

🎯
View GitHub Profile
@QuantumGhost
QuantumGhost / README.md
Created August 12, 2021 03:14
Nix tricks

Some tricks for managing packages with Nix

{ pkgs, sumFile }:
with pkgs;
let
mod2prefix = path: version: hash:
let
fullpath = "${path}@${lib.strings.removeSuffix "/go.mod" version}";
manifest = runCommand "${fullpath}.manifest"
{
outputHashMode = "flat";
outputHashAlgo = "sha256";
@QuantumGhost
QuantumGhost / sudo.pam
Created June 21, 2021 02:50
use touch id for sudo
# Put the line below in /etc/pam.d/sudo, before other lines
auth sufficient pam_tid.so
package main
import "time"
// https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
type Client struct {
addr string
timeout time.Duration
}
-------------------------------------------------
nench.sh v2019.07.20 -- https://git.io/nench.sh
benchmark timestamp: 2021-05-30 14:40:17 UTC
-------------------------------------------------
Processor: DO-Premium-AMD
CPU cores: 1
Frequency: 1999.947 MHz
RAM: 989Mi
Swap: -
package temp
import (
"fmt"
"github.com/rs/zerolog"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"io/ioutil"
"testing"
@QuantumGhost
QuantumGhost / disable-macos-notarization.md
Created May 9, 2020 02:31
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

*://*.cengji.com/*
*://*.kknews.cc/*
*://read01.com/*
*://blog.csdn.net/*
*://help.aliyun.com/wordpower/*
*://cloud.tencent.com/developer/information/*
*://www.liankexing.com/*
@QuantumGhost
QuantumGhost / DefaultKeyBinding.dict
Last active January 31, 2023 15:04
xcode keybindings for emacs emulation
{
/* 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:";