Skip to content

Instantly share code, notes, and snippets.

Thomas Charbonnel thomascharbonnel

Block or report user

Report or block thomascharbonnel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thomascharbonnel
thomascharbonnel / set-tmux-title
Last active Mar 5, 2019
Set tmux pane title to short hostname on ssh connections for Fish
View set-tmux-title
# 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"
View ruby_sets_benchmark.rb
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)
You can’t perform that action at this time.