Skip to content

Instantly share code, notes, and snippets.

View adiatma's full-sized avatar
🏠
Work from home

Adiatma Kamarudin adiatma

🏠
Work from home
  • Jakarta, Indonesia
View GitHub Profile
DB_URL=postgres://postgres:efishery@localhost:8845/efishery-db?sslmode=disable
package main
import (
"context"
"net/http"
"os"
_ "github.com/joho/godotenv/autoload"
"gorm.io/driver/postgres"
"gorm.io/gorm"
@adiatma
adiatma / System Design.md
Created September 8, 2021 04:43 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

Keybase proof

I hereby claim:

  • I am adiatma on github.
  • I am adiatma (https://keybase.io/adiatma) on keybase.
  • I have a public key ASC4a18L8mL_yCAXTtNXG_k9NdhLUnW-obDkIDyjZZ4oOQo

To claim this, I am signing this object:

@adiatma
adiatma / nginxproxy.md
Created June 30, 2020 05:39 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

let today = new Date();
let currentMonth = today.getMonth();
let currentYear = today.getFullYear();
let selectYear = document.getElementById("year");
let selectMonth = document.getElementById("month");
let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
let monthAndYear = document.getElementById("monthAndYear");
showCalendar(currentMonth, currentYear);
# Remove MySQL completely.
- ps -ax | grep mysql
- stop and kill any MySQL processes
- brew remove mysql
- brew cleanup
- sudo rm /usr/local/mysql
- sudo rm -rf /usr/local/var/mysql
- sudo rm -rf /usr/local/mysql*
- sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
- sudo rm -rf /Library/StartupItems/MySQLCOM