Skip to content

Instantly share code, notes, and snippets.

View telemachus's full-sized avatar

Peter Aronoff telemachus

  • New York City
  • 13:07 (UTC -04:00)
View GitHub Profile

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
git checkout master
make distclean
make CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS=-DCMAKE_INSTALL_PREFIX=/Users/juju/Development/Applications/neovim/_install
Already on 'master'
Your branch is ahead of 'origin/master' by 9871 commits.
(use "git push" to publish your local commits)
rm -rf ".deps"
rm -rf build
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C test/old/testdir clean
@telemachus
telemachus / builtin-compl.lua
Created December 18, 2024 00:24 — forked from MariaSolOs/builtin-compl.lua
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
@telemachus
telemachus / go-stdlib-interface-selected.md
Created May 17, 2021 00:22 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.