Manage Ruby environments with RVM

Let’s say you have multiple ruby project on your laptop: project A with Ruby 2.6 project B with Ruby 3.1 and dependencies in 5.x version project C with Ruby 3.1 too but dependencies in 8.x version What a mess ! RVM to the rescue ! RVM is a tool who will let you manage your ruby environments Install RVM $ curl -sSL https://get.rvm.io | bash Open a new terminal to be able to use it....

<span title='2022-02-11 00:00:00 +0000 UTC'>February 11, 2022</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;JC

How to build a docker multiarch image with buildah

Let’s say we want to build a custom multiarch image named my-image. Very simple and minimalistic Dockerfile example: FROM debian:latest With buildah Login to docker hub or your private registry: buildah login docker.io Create a manifest, it is a kind of enveloppe who will contain your docker image with different architectures. buildah manifest create my-manifest Build images and store them in your manifest: for PLATFORM in linux/386 linux/amd64 linux/arm64/v8 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm/v8 linux/s390x linux/ppc64le do buildah bud --manifest my-manifest --platform ${PLATFORM} done $PLATFORM variable use $GOOS and $GOARCH variables, you can get a list by clicking here...

<span title='2022-02-09 10:00:00 +0000 UTC'>February 9, 2022</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;JC

Memo git config

Everytime I configure a new PC or env, I search for this: git config --global user.name "John Doe" git config --global user.email "[email protected]" git config --global gpg.program gpg git config --global pull.ff only git config --global commit.gpgsign true git config --global init.defaultBranch main git config --global push.default current git config user.email "[email protected]"

<span title='2021-11-27 10:00:00 +0000 UTC'>November 27, 2021</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;JC

Memo tmux config

Here is my tmux config, works on both MacOS / Linux #https://gitlab.com/AnatomicJC/tmux-themepack source "${HOME}/git/github/tmux-themepack/powerline/default/blue.tmuxtheme" set -g default-terminal "screen-256color" set -g mouse on set -g history-limit 500000 bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" # https://blog.jpalardy.com/posts/tmux-synchronized-panes/ bind C-x setw synchronize-panes # Memos # tmux list-keys | grep selection # tmux show -wg mode-keys (must return vi, not emacs) # For binding 'y' to copy and exiting selection mode #bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy' bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'

<span title='2021-11-27 10:00:00 +0000 UTC'>November 27, 2021</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;JC

Memo vim config with powerline

Powerline install: sudo apt install powerline python3-powerline fonts-powerline Vim config: " All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by " the call to :runtime you can find below. If you wish to change any of those " settings, you should do it in this file (/etc/vim/vimrc), since debian.vim " will be overwritten everytime an upgrade of the vim packages is performed. " It is recommended to make changes after sourcing debian....

<span title='2021-11-27 10:00:00 +0000 UTC'>November 27, 2021</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;JC