Skip to content

Instantly share code, notes, and snippets.

View frullah's full-sized avatar
🎯
Focusing

Fajarullah frullah

🎯
Focusing
View GitHub Profile
@frullah
frullah / gist:5cd0517ddfb51633d492d8729326360f
Created June 25, 2021 17:32
zsh fresh installation with starship
sudo apt update
sudo apt install git zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
@frullah
frullah / run_ruby.sh
Last active June 15, 2021 16:29
auto reload code using inotifywait
#!/bin/bash
files_to_watch=$@
file_to_run=$1
inotifywait -e close_write $files_to_watch -m | while read file _event; do bundle exec ruby $file_to_run; done
@frullah
frullah / guide.md
Last active March 23, 2021 04:07
how to use webpacker 6 in rails engine
  1. install rails webpacker 6
  2. add 'runtime' to javascript_pack_tag in dummy views, without that the entire javascript will not be executed
  3. [optional] set app source to the engine app packs
@frullah
frullah / install.sh
Last active March 14, 2021 17:02
install datatables in rails webpacker 6
#!/bin/sh
yarn add \
imports-loader \
jquery \
datatables.net \
datatables.net-bs4 \
datatables.net-responsive \
datatables.net-responsive-bs4
@frullah
frullah / script.sh
Created March 12, 2021 13:28
rails engine RSpec installation
#!/bin/bash
mv spec/dummy/spec/{rails_helper,spec_helper}.rb spec/
@frullah
frullah / docs.md
Created March 11, 2021 16:23
Laravel to rails

Parameters

  • Laravel: $request->parameter

  • Rails:

    jika menggunakan tag form biasa params.permit(:nama_parameter)

@frullah
frullah / custom-generator-templates-guide.md
Created January 17, 2021 12:24
Rails custom generator templates guide

independent generator

example:

  • controller
  • model
  • etc.

lib/templates/rails/{singular_app_type}/{singular_app_type}.rb

@frullah
frullah / rbenv-install.sh
Created December 25, 2020 16:26
rbenv installation in bash
#!/bin/bash
#
# simplified version of https://www.techiediaries.com/install-ruby-2-7-rails-6-ubuntu-20-04/
#
# make sure you have install all requisite libraries
# see https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
@frullah
frullah / README.md
Last active March 5, 2021 06:22
Advanced rails project template
@frullah
frullah / rbenv-system-wide-installation78.sh
Created November 8, 2020 16:53
rbenv system wide install
#!/bin/bash
RBENV_GROUP=admin
# install rbenv in /usr/local/rbenv
cd /usr/local
git clone git://github.com/sstephenson/rbenv.git rbenv
chgrp -R ${RBENV_GROUP} rbenv
chmod -R g+rwxXs rbenv