Skip to content

Instantly share code, notes, and snippets.

@hotcha
hotcha / Dockerfile
Created November 16, 2025 16:54 — forked from vikingmute/Dockerfile
# ================================
# Next.js 生产最优模板
# 最终镜像 130~160MB
# ================================
# 公共 base(只拉一次镜像,所有阶段共享)
FROM node:22-alpine AS base
RUN apk add --no-cache libc6-compat
# pnpm 只装一次,所有阶段都能用
RUN corepack enable && corepack prepare pnpm@latest --activate
# https://superuser.com/a/385870
setw -g mode-keys vi
setw -g window-status-current-bg blue
setw -g automatic-rename on
set -g status-keys vi
set -g history-limit 100000
set -g base-index 1
set -s escape-time 0
setw -g mode-mouse on
@hotcha
hotcha / custom_complex_modifications.json
Last active July 23, 2017 20:15
Karabiner custom complex_modifications
{
"title": "Custom",
"rules": [
{
"description": "Launch apps",
"manipulators": [
{
"from": {
"key_code": "o",
"modifiers": {
@hotcha
hotcha / baidu-as-a-network-utility.css
Last active May 15, 2016 13:16 — forked from tianyuf/baidu-as-a-network-utility.css
BaaN: Baidu as a Network Utility - 百度的实用主义方法论.
@-moz-document domain("www.baidu.com") {
body {
display: none;
}
html {
margin: 30px;
}
html::after {
@hotcha
hotcha / tmux-cheatsheet.markdown
Created April 13, 2016 03:10 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@hotcha
hotcha / ttc2ttf.py
Created March 18, 2016 04:11
Python script to convert a true type font collection into separate ttf files. Copy from http://pastebin.com/QXcAtP24
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#First released as C++ program by Hiroyuki Tsutsumi as part of the free software suite “Beer”
#I thought porting it to Python could be both a challenge and useful
from sys import argv, exit, getsizeof
from struct import pack_into, unpack_from
def ceil4(n):
set encoding=utf-8 " The encoding displayed.
set fileencoding=utf-8 " The encoding written to file.