Skip to content

Instantly share code, notes, and snippets.

View milhamh95's full-sized avatar
🎯
Focusing

Muhammad Ilham Hidayat milhamh95

🎯
Focusing
View GitHub Profile
@milhamh95
milhamh95 / gist:ff194322cecd6ba56573b2eddaecf13a
Created January 22, 2022 07:54
Go 1.17 unexpected signal during runtime execution
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff204acc9e]
runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204acc9e
stack: frame={sp:0x7ffeefbff578, fp:0x7ffeefbff5c8} stack=[0x7ffeefb80618,0x7ffeefbff680)
0x00007ffeefbff478: 0x01007ffeefbff498 0x0000000000000004
0x00007ffeefbff488: 0x000000000000001f 0x00007fff204acc9e
0x00007ffeefbff498: 0x0b01dfacedebac1e 0x0000000000000001
0x00007ffeefbff4a8: 0x00000000040362f1 <runtime.throw+0x0000000000000071> 0x00007ffeefbff548
@milhamh95
milhamh95 / JSON Marshal struct data.go
Created July 21, 2021 22:44
JSON Marshal struct data - exported field
package main
import (
"encoding/json"
"fmt"
)
type book struct {
// set exported field by
// by capitalizing the first letter
@milhamh95
milhamh95 / mkcd.txt
Created February 22, 2021 01:29
mkcd
function mkcd {
mkdir -p "$1" && cd "$1"
}

mongoose-crud

mongoose-crud merupakan aplikasi untuk menyimpan data buku, transaksi, dan customer menggunakan mongo db dan framework mongoose

List Route

Route Book

Route HTTP Description
/api/books GET Mendapatkan data semua buku
/api/books POST Menambah data buku
@milhamh95
milhamh95 / 0_reuse_code.js
Created April 23, 2017 12:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">