Skip to content

Instantly share code, notes, and snippets.

View paresharma's full-sized avatar

paresh brahmacharimayum paresharma

View GitHub Profile
@paresharma
paresharma / tmux.md
Created July 11, 2019 02:48 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@paresharma
paresharma / sidekiq.rb
Created January 15, 2019 14:31 — forked from sharmaparesh/sidekiq.rb
Sidekiq
require 'sidekiq/api'
# Clear retry set
Sidekiq::RetrySet.new.clear
# Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@paresharma
paresharma / iterm_open_with
Last active May 21, 2021 13:30 — forked from sos4nt/iterm_open_with
Semantic history command for iTerm2 and Atom editor. In iTerm's Preferences > Profiles > Default > Advanced > Semantic History, choose "Run command..." and enter "/your/path/to/iterm_open_with \1 \2".
#!/bin/sh
file "$1" | grep -q "text"
if [ $? -ne 0 ]; then
/usr/bin/open $1
else
if [[ -z "$2" ]]; then
FILE_PATH="$1"
else
FILE_PATH="$1:$2"
fi