Skip to content

Instantly share code, notes, and snippets.

Mohammad Shahrizal Prabowo rizalp

  • Indonesia
View GitHub Profile

Install Development Dependencies

sudo apt-fast install git zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libffi-dev libjemalloc-dev libgmp-dev nodejs

git clone ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
rizalp /
Created Apr 19, 2019
sqlite3 from source ubuntu
  • Download and extract the autoconf
  • ./configure && make
  • gem install sqlite3 -- --with-sqlite3-include=/home/rizalp/package/sqlite-autoconf-3280000 --with-sqlite3-lib=/home/rizalp/package/sqlite-autoconf-3280000/.libs
rizalp / JavaScript Sieve Of Atkin.js
Created May 3, 2013
return array of primes below limit using Sieve of Atkin Algorithm #JavaScript #primes
View JavaScript Sieve Of Atkin.js
function sieveOfAtkin(limit){
var limitSqrt = Math.sqrt(limit);
var sieve = [];
var n;
//prime start from 2, and 3
sieve[2] = true;
sieve[3] = true;
for (var x = 1; x <= limitSqrt; x++) {
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 /
Created Feb 3, 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"

Then sudo update-grub

rizalp / init-zram-swapping
Last active Jan 18, 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 /
Last active Jan 15, 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
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 / JavaScript: Anonymous Functions And The Module Pattern.js
Created May 2, 2013
JavaScript: Anonymous Functions And The Module Pattern
View JavaScript: Anonymous Functions And The Module Pattern.js
//For example, the following definition would result in three global variables and two global functions:
var name = 'Chris';
var age = '34';
var status = 'single';
function createMember(){
// [...]
function getMemberDetails(){
// [...]
You can’t perform that action at this time.