This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"code": "pos", | |
"name": "POS Indonesia (POS)" | |
}, | |
{ | |
"code": "jne", | |
"name": "Jalur Nugraha Ekakurir (JNE)" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am assuming that the modles will look like this | |
class Customer < ApplicationRecord | |
has_many :purcases | |
# Rest of the code | |
end | |
class Purcase < ApplicationRecord | |
has_one :discount_coupon_usage | |
# Rest of the code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
export ror='https://gist.githubusercontent.com/aaripurna/56ff2ab5f6320984c105f337d500cd3f/raw' | |
get-config() { | |
link=${!1} | |
if [[ ! -z $link ]]; then | |
curl -L $link | tee $HOME/.editorconfig/$1 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# clone sublime config from github | |
clone() { | |
git clone https://github.com/aaripurna/sublime-config.git ~/sublime-config | |
rm -rf sublime-config/.git | |
cd ~/.config/sublime-text-3/Installed\ Packages/ | |
mv ~/sublime-config/* ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
update() { | |
sudo apt update #&& sudo apt upgrade -y | |
} | |
credential() { | |
sudo apt install make g++ git curl redis-server libgmp3-dev zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev postgresql postgresql-contrib libpq-dev -y |
NewerOlder