Skip to content

Instantly share code, notes, and snippets.

@fursich
fursich / .vimrc
Created January 7, 2020 13:33
vimrc
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
if !filereadable(vimplug_exists)
if !executable("curl")
echoerr "You have to install curl or first install vim-plug yourself!"
execute "q!"
endif
echo "Installing Vim-Plug..."
echo ""
silent !\curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@fursich
fursich / update_to_ruby_2.7.0.sh
Created December 25, 2019 12:32
manually updating ruby-build for Ruby 2.7.0
$ cd "$(rbenv root)"/plugins/ruby-build
# brew利用の場合は
# $ cd /usr/local/Cellar/ruby-build/xxxxxxx/share/ruby-build
$ cat << EOL > share/ruby-build/2.7.0
> install_package "openssl-1.1.1d" "https://www.openssl.org/source/openssl-1.1.1d.tar.gz#1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2" mac_openssl --if has_broken_mac_openssl
> install_package "ruby-2.7.0" "https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.0.tar.bz2#7aa247a19622a803bdd29fdb28108de9798abe841254fe8ea82c31d125c6ab26" ldflags_dirs enable_shared standard verify_openssl
> EOL
$ rbenv install 2.7.0
@fursich
fursich / array_benchmarks.txt
Last active December 5, 2018 03:56
benchmarking Array#all? #none? #one? (vs old implementation Enumerator#all?, etc)
**********************************************************************************
benchmarking Array#all?
**********************************************************************************
Calculating -------------------------------------
Array#all? (new) 421.298 i/s - 1.000k times in 2.373616s (2.37ms/i)
Array#all? (old) 335.364 i/s - 1.000k times in 2.981838s (2.98ms/i)
Comparison:
Array#all? (new): 421.3 i/s