Skip to content

Instantly share code, notes, and snippets.

View zahidmuhammadzaki's full-sized avatar
👽
Zrrrt!

Zahid zahidmuhammadzaki

👽
Zrrrt!
  • Profesi.io
  • Jakarta, Indonesia
View GitHub Profile
@zahidmuhammadzaki
zahidmuhammadzaki / AdonisJs - SoftDelete.js
Last active June 5, 2020 07:45 — forked from andresilvagomez/SoftDeletes.js
Soft delete trait for Adonis 4.
// $ adonis make:trait SoftDelete
class SoftDelete {
register (Model, customOptions = {}) {
const deletedAtColumn = customOptions.name || `${Model.table}.deleted_at`;
Model.addGlobalScope(builder => {
builder.whereNull(deletedAtColumn);
}, 'soft_delete');
@zahidmuhammadzaki
zahidmuhammadzaki / Indonesia - provinces.json
Last active July 18, 2020 07:16
List of indonesia provinces
[
{"id": 1, "name": "ACEH"},
{"id": 2, "name": "SUMATERA UTARA"},
{"id": 3, "name": "SUMATERA BARAT"},
{"id": 4, "name": "RIAU"},
{"id": 5, "name": "JAMBI"},
{"id": 6, "name": "SUMATERA SELATAN"},
{"id": 7, "name": "BENGKULU"},
{"id": 8, "name": "LAMPUNG"},
{"id": 9, "name": "KEPULAUAN BANGKA BELITUNG"},
@zahidmuhammadzaki
zahidmuhammadzaki / Indonesia - cities.json
Created July 18, 2020 07:17
List of indonesia cities
[
{"province_id": 1, "name": "KAB. ACEH SELATAN"},
{"province_id": 1, "name": "KAB. ACEH TENGGARA"},
{"province_id": 1, "name": "KAB. ACEH TIMUR"},
{"province_id": 1, "name": "KAB. ACEH TENGAH"},
{"province_id": 1, "name": "KAB. ACEH BARAT"},
{"province_id": 1, "name": "KAB. ACEH BESAR"},
{"province_id": 1, "name": "KAB. PIDIE"},
{"province_id": 1, "name": "KAB. ACEH UTARA"},
{"province_id": 1, "name": "KAB. SIMEULUE"},
@zahidmuhammadzaki
zahidmuhammadzaki / cloudSettings
Created August 5, 2020 15:42
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-05T15:42:19.499Z","extensionVersion":"v3.4.3"}