Skip to content

Instantly share code, notes, and snippets.

Mohammad Shahrizal Prabowo rizalp

  • Indonesia
Block or report user

Report or block rizalp

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
rizalp / mysql2 5.7 gem
Last active May 28, 2019
install mysql2 gem
View mysql2 5.7 gem
brew install mysql@5.7
gem install mysql2 -v '0.4.8' -- --with-ldflags=-L/usr/local/opt/mysql@5.7/lib --with-cppflags=-I/usr/local/opt/mysql@5.7/include
rizalp /
Last active Oct 14, 2019
sqlite3 from source ubuntu

Or if using Bundler

  • bundle config build.sqlite3 --with-sqlite3-dir=$HOME/.local
rizalp / remove
Last active Mar 18, 2019
Remove Unused Package Ubuntu
View remove
sudo apt purge pidgin transmission-common libreoffice* thunderbird parole snapd firefox fonts-noto-cjk gnome-software
rizalp /
Created Feb 11, 2019
Install sqlite3 Ruby gem with homebrew's version of sqlite
gem install sqlite3 -- --with-sqlite3-include=/usr/local/Cellar/sqlite/3.27.1/include --with-sqlite3-lib=/usr/local/Cellar/sqlite/3.27.1/lib
rizalp /
Last active May 26, 2019
Disable Spectre/Meltdown Mitigation

In /etc/default/grub, modify:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nopti nospectre_v1 nospectre_v2 l1tf=off nospec_store_bypass_disable no_stf_barrier noibrs noibpb mds=off mitigations=off"

Then sudo update-grub

rizalp /
Last active Aug 6, 2019
macOs Mojave Rails Setup with jemalloc and gmp

Homebrew install

ruby -e "$(curl -fsSL"

Install Libraries

brew install rbenv ruby-build sqlite3 jemalloc gmp

Install Development Dependencies

sudo apt install curl
curl -sL | sudo -E bash -
curl -sS | sudo apt-key add -
echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update
rizalp /
Last active Jan 14, 2019
Ruby On Rails using package manager instead of rbenv

Minimal Ruby On Kubuntu:


install: --user-install
update: --user-install


rizalp / init-zram-swapping
Last active Aug 27, 2019
/usr/bin/init-zram-swapping custom config
View init-zram-swapping
# load dependency modules
# NRDEVICES=$(grep -c ^processor /proc/cpuinfo | sed 's/^0$/1/')
if modinfo zram | grep -q ' zram_num_devices:' 2>/dev/null; then
elif modinfo zram | grep -q ' num_devices:' 2>/dev/null; then
rizalp / DeepCopy.js
Last active Dec 28, 2015
How to do deep copy to Javascript object, and call the parent's own prototype method
View DeepCopy.js
/* Title: Deep Copy Object Properties
* Refference:
* Description: an object gets functionality from another object, simply by copying it
* Only the properties will be copied. The prototype will not
* it is generally not recomended to copy the prototype over
/* deep copy */
function extendDeep(parent, child) {
var i, toStr = Object.prototype.toString,
You can’t perform that action at this time.