Skip to content

Instantly share code, notes, and snippets.

View thierrymoudiki's full-sized avatar

Thierry Moudiki thierrymoudiki

View GitHub Profile
@thierrymoudiki
thierrymoudiki / Ruby with chruby
Created August 22, 2023 01:33 — forked from rubyandcoffee/Ruby with chruby
chruby - Installing and managing Ruby versions
To install chruby and ruby-install:
brew install chruby ruby-install
To install Ruby using ruby-install:
ruby-install ruby 2.7.1
NOTE: You can find latest stable version of Ruby here: https://www.ruby-lang.org/en/downloads/
If you have issues installing Ruby then try the following:
brew install openssl@3
ruby-install 3.2.2 -- --with-openssl-dir=$(brew --prefix openssl@3)
@thierrymoudiki
thierrymoudiki / doSNOW.R
Created October 3, 2025 07:31 — forked from andrie/doSNOW.R
Progress bars with foreach and doSNOW
library(doSNOW)
library(tcltk)
cl <- makeSOCKcluster(2)
registerDoSNOW(cl)
pb <- txtProgressBar(max=100, style=3)
progress <- function(n) setTxtProgressBar(pb, n)
opts <- list(progress=progress)
r <- foreach(i=1:100, .options.snow=opts) %dopar% {