Skip to content

Instantly share code, notes, and snippets.

View Yozh2's full-sized avatar
🦔
WORK AS A HEDGEHOG

Nikolai Gaiduchenko Yozh2

🦔
WORK AS A HEDGEHOG
View GitHub Profile
@tanyuan
tanyuan / smart-caps-lock.md
Last active April 24, 2026 06:28
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@buzzerrookie
buzzerrookie / isa.py
Created January 28, 2016 07:07
Python program to compute International Standard Atmosphere
import sys
import math
g = 9.80665
R = 287.00
def cal(p0, t0, a, h0, h1):
if a != 0:
t1 = t0 + a * (h1 - h0)
p1 = p0 * (t1 / t0) ** (-g / a / R)
else:
@astrofrog
astrofrog / test_oo.py
Created February 13, 2011 18:48
Diagnosing Memory Leaks in Matplotlib
# Object-oriented API
#
# Memory usage (iteration, object count, memory size)
# 100 5637 1562216
# 200 5529 1491528
# 300 5422 1426264
# 400 5758 1587376
# 500 5422 1426288
# 600 5416 1440456
# 700 5610 1515056