This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
require 'set' | |
require 'fds' | |
Benchmark.bm(30) do |bm| | |
bm.report('Using FDS::UnorderedSet') do | |
set = FDS::UnorderedSet.new | |
10_000.times do | |
set << rand | |
set.find_index(42) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy that into your ~/.config/fish/config.fish | |
function ssh | |
set ps_res (ps -p (ps -p %self -o ppid= | xargs) -o comm=) | |
if [ "$ps_res" = "tmux" ] | |
tmux rename-window (echo $argv | cut -d . -f 1) | |
command ssh "$argv" | |
tmux set-window-option automatic-rename "on" 1>/dev/null | |
else | |
command ssh "$argv" |