Skip to content

Instantly share code, notes, and snippets.

View frizbee's full-sized avatar
🎯
Focusing

Andre frizbee

🎯
Focusing
View GitHub Profile
@frizbee
frizbee / install-ruby.sh
Last active November 12, 2022 05:51 — forked from hopsoft/install-ruby.sh
Install ruby with rbenv and jemalloc on ubuntu
sudo apt-get update
sudo apt-get install libjemalloc-dev
RUBY_CONFIGURE_OPTS='--with-jemalloc' rbenv install 2.7.1
rbenv global 2.7.1
# test (look for jemalloc warnings)
MALLOC_CONF=invalid_flag:foo ruby -v
# check
ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']"
brew update
brew upgrade
rbenv install -l
# will list all latest ruby versions
# if it will not show all latest versions
# then run:
cd ~/.rbenv/plugins/ruby-build/ && git pull
# list all versions again
@frizbee
frizbee / summernote-with-image-attributes.md
Last active September 20, 2023 09:47
Summernote for Rails 6 using webpacker with Image title and alt attributes

Summernote editor for Rails 6 with webpacker and image attributes

WYSIWYG editor for website is summernote https://summernote.org

Setup

Summernote setup with webapcker, using yarn add command

yarn add summernote@0.8.16
@frizbee
frizbee / password_regex.md
Last active January 19, 2024 08:55
Regex for password must contain

Minimum eight characters, at least one letter and one number:

/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/

Minimum eight characters, at least one letter, one number and one special character:

/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$/

Minimum eight characters, at least one uppercase letter, one lowercase letter and one number: