Skip to content

Instantly share code, notes, and snippets.

View davidgoldcode's full-sized avatar

David Gold davidgoldcode

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active October 14, 2024 06:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

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]}
@ckabalan
ckabalan / best_bash_history.sh
Last active October 12, 2024 19:40
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
@ldez
ldez / gmail-github-filters.md
Last active October 6, 2024 20:44
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
@bonniss
bonniss / github-search-cheatsheet.md
Last active October 2, 2024 16:04
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

@ravgeetdhillon
ravgeetdhillon / gmail-filters.md
Last active September 30, 2024 12:16
Gmail Filters

Gmail Filters

Filters for turning Gmail into a productive workspace.

All the unread emails

is:unread
@nerdalert
nerdalert / vim-cheatsheet.md
Last active July 22, 2024 10:53
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

#!/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)
@denmarkin
denmarkin / resque.rake
Created September 20, 2011 11:02
My rake task for clearing Resque queues and stats
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version
# see https://github.com/defunkt/resque/issues/49
# see http://redis.io/commands - new commands
namespace :resque do
desc "Clear pending tasks"
task :clear => :environment do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."
@jakelevi1996
jakelevi1996 / Notes on bash.md
Last active February 20, 2023 14:18
Notes on bash