Skip to content

Instantly share code, notes, and snippets.

Avatar

Mohammad Shahrizal Prabowo rizalp

  • Indonesia
View GitHub Profile
@rizalp
rizalp / phpbuild.md
Last active Sep 30, 2020
Minimal Build of PHP 7.4.10, linked with sqlite3 from source on Ubuntu 20.04 And Macos
View phpbuild.md
View zswap.md
@rizalp
rizalp / mysql2 gem with mysql 5.7 brew
Last active Jan 1, 2020
install mysql2 gem by linking it with mysql 5.7 homebrew
View mysql2 gem with mysql 5.7 brew
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
rizalp / gem-sqlite3-source.md
Last active Mar 22, 2020
sqlite3 from source ubuntu
View gem-sqlite3-source.md

Or if using Bundler

  • bundle config build.sqlite3 --with-sqlite3-dir=$HOME/.local
@rizalp
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
rizalp / homebrew-sqlite3.md
Created Feb 11, 2019
Install sqlite3 Ruby gem with homebrew's version of sqlite
View homebrew-sqlite3.md
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
rizalp / disable_spectre.md
Last active Nov 6, 2020
Disable Spectre/Meltdown Mitigation
View disable_spectre.md

In /etc/default/grub, modify:

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

Then sudo update-grub

@rizalp
rizalp / mojave-rails-jemalloc-gmp.md
Last active Aug 6, 2019
macOs Mojave Rails Setup with jemalloc and gmp
View mojave-rails-jemalloc-gmp.md

Homebrew install

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Libraries

brew install rbenv ruby-build sqlite3 jemalloc gmp
View rbenv-rails-ubuntu1804.md

Install Development Dependencies

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update
@rizalp
rizalp / zram-ubuntu-1804.md
Last active Feb 20, 2020
Zram Ubuntu 1804
View zram-ubuntu-1804.md
  • sudo apt install zram-config, this will install several files, including systemd startup /etc/systemd/system/multi-user.target.wants/zram-config.service
  • sudo nano /usr/bin/init-zram-swapping and edit:
#!/bin/sh

# load dependency modules
NRDEVICES=1
if modinfo zram | grep -q ' zram_num_devices:' 2>/dev/null; then
  MODPROBE_ARGS="zram_num_devices=${NRDEVICES}"
You can’t perform that action at this time.