Skip to content

Instantly share code, notes, and snippets.

View davidgoldcode's full-sized avatar

David Gold davidgoldcode

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]}
#!/bin/sh
umask 077
# File extension for the notes
note_ext="md"
fzf_opts="--height 50%"
# Preview script part of FZF.vim. Defaults to something else if not present (but
# not as fancy)
@jakelevi1996
jakelevi1996 / Notes on bash.md
Last active February 20, 2023 14:18
Notes on bash
@ravgeetdhillon
ravgeetdhillon / gmail-filters.md
Last active May 18, 2022 12:56
Gmail Filters

Gmail Filters

Filters for turning Gmail into a productive workspace.

All the unread emails

is:unread
@bonniss
bonniss / github-search-cheatsheet.md
Last active June 12, 2024 04:14
Github search cheatsheet from official docs.

Github Search Cheat Sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search

@nrocco
nrocco / _notes
Created May 13, 2019 18:42
Notes system using fzf, rg, fd and vim
#compdef notes
local line state
_arguments -C \
"1:Command:(ls search edit rm help)" \
"2:arg:->args"
if [[ "$state" == "args" ]]
then
case "$line[1]" in
@ldez
ldez / gmail-github-filters.md
Last active June 9, 2024 05:23
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@ckabalan
ckabalan / best_bash_history.sh
Last active May 1, 2024 17:29
The Best Bash History Settings Ever
# /etc/profile.d/best_bash_history.sh
# Save 5,000 lines of history in memory
HISTSIZE=10000
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
HISTFILESIZE=2000000
# Append to history instead of overwrite
shopt -s histappend
# Ignore redundant or space commands
HISTCONTROL=ignoreboth
# Ignore more
@nerdalert
nerdalert / vim-cheatsheet.md
Last active November 8, 2023 23:38
VIM Cheatsheet

VIM Cheatsheet

Cursor movement

h - move cursor left
j - move cursor down
k - move cursor up
l - move cursor right

w - jump forwards to the start of a word

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 15, 2024 23:32
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname