Skip to content

Instantly share code, notes, and snippets.

View davidgoldcode's full-sized avatar

David Gold davidgoldcode

View GitHub Profile
@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}..."
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 29, 2024 15:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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

@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
@ldez
ldez / gmail-github-filters.md
Last active May 25, 2024 12:10
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
@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
@bonniss
bonniss / github-search-cheatsheet.md
Last active May 9, 2024 09:20
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 May 18, 2022 12:56
Gmail Filters

Gmail Filters

Filters for turning Gmail into a productive workspace.

All the unread emails

is:unread
@jakelevi1996
jakelevi1996 / Notes on bash.md
Last active February 20, 2023 14:18
Notes on bash
#!/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)