Skip to content

Instantly share code, notes, and snippets.

View hadihammurabi's full-sized avatar
😎
Let's code with me!

Hadi Hidayat Hammurabi hadihammurabi

😎
Let's code with me!
View GitHub Profile

Linux Suspend Commands

Suspend to RAM

# echo mem > /sys/power/state

@hadihammurabi
hadihammurabi / database.sql
Last active September 19, 2019 04:53
PostgreSQL Sharding with Declarative Partition Example
CREATE TYPE jeniskelamin AS ENUM('l', 'p');
CREATE TABLE users (
username VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
jk jeniskelamin NOT NULL
) PARTITION BY LIST(jk);
CREATE TABLE users_l PARTITION OF users FOR VALUES IN('l');
CREATE TABLE users_p PARTITION OF users FOR VALUES IN('p');
@hadihammurabi
hadihammurabi / Pythonic_Way.md
Created March 5, 2020 13:50 — forked from ypraw/Pythonic_Way.md
Rangkuman Kulgram pythonic way , telegram group taman kode-kode https://t.me/tamankodekode

Introduce Python : Pythonic way, Guide of life to become the pythonist

Prasyarat

  • Installed Python 3.* above (my recomendations 3.7), you can download here

  • Text editor or IDE, everything you like it. an example vim, micro, nano, visual studio code, pycharm, Netbeans etc. (maybe i use jupyter notebook XD)

  • a cup of coffe and enjoy :D

@hadihammurabi
hadihammurabi / casbin.md
Last active February 3, 2021 10:13
Casbin With Golang

Casbin

Model

  • request_definition pola parameter pengecekan otorisasi.
  • policy_definition pola otorisasi yang terdaftar.
  • role_definition pola role atau group yang terdaftar.
  • policy_effect kondisi untuk menentukan diizinkan atau tidak.
  • matchers kondisi yang digunakan untuk memenuhi kondisi pada policy effect.