start new:
tmux
start new with session name:
tmux new -s myname
| # 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}..." |
| # /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 |
| #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 |
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.
This is just a random collection of commands which I have found useful in Bash. This Gist is expected to grow over time (until I have mastered the whole of Bash). Another useful resource is this list of Unix commands on Wikipedia. Hyperlinked bash commands in general lead to relevant Man (manual) pages.
| #!/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) |