Skip to content

Instantly share code, notes, and snippets.

View aaripurna's full-sized avatar
💣
(_T_)

nawa aripurna aaripurna

💣
(_T_)
View GitHub Profile
{
"data": [
{
"code": "pos",
"name": "POS Indonesia (POS)"
},
{
"code": "jne",
"name": "Jalur Nugraha Ekakurir (JNE)"
},
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
@aaripurna
aaripurna / editor-config-generator
Last active June 9, 2019 10:17
generate editor config for certain project
#!/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
@aaripurna
aaripurna / rails-editorconfig
Last active June 2, 2019 01:47
this is editor config for rails project
# 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
@aaripurna
aaripurna / sublime-config
Last active June 2, 2019 04:50
basic sublime text 3 config
#!/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/* ./
@aaripurna
aaripurna / setup
Last active June 2, 2019 07:33
quick setup development setup for ubuntu derivatives distros
#!/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