start new with session name:
tmux new -s master
attach to session by name:
tmux a -t myname
| # IRBRC tweaking for better productivity with Ruby 2+ | |
| # edit: ~/.irbrc | |
| # save IRB history | |
| require 'irb/ext/save-history' | |
| #History configuration | |
| IRB.conf[:SAVE_HISTORY] = 100 | |
| IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
| # enable autocompletion |
Currated list of usefull complex command in git.
Search in reverse order the hash of the commit missing on master from the dev branch.
git log origin/master..origin/dev --oneline --reverse --pretty=format:"%h"
# copy/paste output in vscode to create a single line command like this:
git cherry-pick ef55b76d02f 1b85300d4fa a2197fe36d7
Code
| # Tmux 2.5 configuration file | |
| # | |
| # ~/.tmux.conf | |
| # | |
| # Enable scrooling with the mouse | |
| # | |
| # e-tmux-scrolling-in-iterm2/ | |
| set-window-option -g mode-mouse on | |
| set-option -g mouse-select-pane on | |
| set-option -g mouse-select-window on |
| require 'mongo' | |
| client = Mongo::Client.new("mongodb://localhost:27017", {database: 'test'}) | |
| db = client.db | |
| # Show all collection | |
| db.collection_names | |
| # Count number of document | |
| db["searches"].count() |