Skip to content

Instantly share code, notes, and snippets.

View benmaier's full-sized avatar

Benjamin F. Maier benmaier

View GitHub Profile
@benmaier
benmaier / howto.md
Created January 9, 2025 15:12
Make vim in iterm2 use up/down arrow keys when using the scroll wheel

defaults write com.googlecode.iterm2 AlternateMouseScroll -bool true

@benmaier
benmaier / FN_key_bindings_macOS_Home_End_pgup_pgdn.md
Created January 19, 2025 10:50
FN key bindings macOS Home/End, PgUp, PgDn

put this in ~/Library/KeyBindings/DefaultKeyBinding.dict:

{
    "\UF729" = "moveToBeginningOfLine:";
    "\UF72B" = "moveToEndOfLine:";
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:"; // shift-home
    "$\UF72B" = "moveToEndOfLineAndModifySelection:"; // shift-end
    "^\UF729" = "moveToBeginningOfDocument:"; // ctrl-home
 "^\UF72B" = "moveToEndOfDocument:"; // ctrl-end
@benmaier
benmaier / .zshrc
Last active May 8, 2025 11:16
Terminal command to inspect a parquet schema overview (with python-polars)
parq () {
python -c "import polars as po; schema = po.read_parquet_schema('$1'); n = max(map(len,schema.keys())); [ print(f'{k.ljust(n,\" \")}: {v}') for k, v in schema.items() ]"
}