Skip to content

Instantly share code, notes, and snippets.

View XiaozhanYang's full-sized avatar

Cody Xiaozhan Yang XiaozhanYang

View GitHub Profile
@XiaozhanYang
XiaozhanYang / pip_target_freeze.py
Created September 20, 2024 23:59 — forked from jaymecd/pip_target_freeze.py
Get `pip freeze` packages for target directory, which was installed using `pip install -t <path>`
#!/usr/bin/env python
# RUN: pip_target_freeze.py <path>
from pip._vendor import pkg_resources
import sys
def find_on_path(path):
dists = pkg_resources.find_on_path(None, path)
dists = sorted(dists, key=lambda item: str(item))
@XiaozhanYang
XiaozhanYang / iterm2.md
Created June 16, 2021 13:04 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)