Skip to content

Instantly share code, notes, and snippets.

View abdulhadad's full-sized avatar

Abdul Hadad abdulhadad

View GitHub Profile
@abdulhadad
abdulhadad / promise_async.md
Created December 17, 2019 03:27
promise_async.md
```js
var asyncRequest = new Promise(function(resolve, reject) {
        return setTimeout(function(){
            resolve({body: {
                a: process.env.AUTH_URL,
                b: process.env.AUTH_HEADERSKEY,
                c: process.env.AAUTH_HEADERSVAL,
                d: obj
            }})

}, 3000);

@abdulhadad
abdulhadad / launch.json
Created December 13, 2019 08:03
VS Code start with env and test with debug
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
@abdulhadad
abdulhadad / semantic_commit.md
Last active December 13, 2019 08:06
Semantic commit

Semantic commit

Desciption

Semantic Git commits start with a semantic tag and use an imperative voice. Git commit messages should be prefixed with one the following tags:

feat: - implement new features for endusers
fix: - bug fix for endusers (not a build-process fix)
docs: - update to project documentation
@abdulhadad
abdulhadad / node - remove node_modules.md
Last active September 19, 2022 05:28
Hapus semua node_modules

Perintah

FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" echo %d"

FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rd /s /q "%d"

# linux/mac 
find . -name "node_modules" -type d -prune | xargs du -chs # list
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@abdulhadad
abdulhadad / db - mongodb janitor.md
Last active June 21, 2019 19:27
mongodb janitor

Dump collection

"C:\Program Files\MongoDB\Server\4.0\bin\mongodump" --host 10.xxx.111.xx --port 54xxx --db users --collection authentication  --out mongodump-users

Restore collection

## db and collection must be exist
@abdulhadad
abdulhadad / linux - tmux.md
Last active May 17, 2019 08:04
Tmux sample usage

tmux

Masuk dan keluar tmux

# Masuk
tmux

# Keluar
exit
@abdulhadad
abdulhadad / java - httponly headers.md
Created January 24, 2019 07:43
Java HttpOnly Headers

HttpOnly Session

Kebutuhan

  • servlet 3+
  • konfigurasi web.xml
...
@abdulhadad
abdulhadad / nodejs - windows 10 dev setup.md
Created January 3, 2019 04:58
Setup development nodejs di windows 10

Setup development nodejs di windows 10

Kebutuhan

  • NodeJS versi LTS
  • Browser Chome atau Firefox terbaru
  • Editor Visual Studio Code
  • Konsol dengan fitur komplesi tab, riwayat dan split windows
  • Pasang yarn sebagai alternatif manajer paket
@abdulhadad
abdulhadad / linux - wget web folder.md
Last active November 27, 2018 10:45
Download folder web wget
wget -r -np -e "robots = off" http://host/folder/
wget -r -np -e "robots = off" -k http://host/folder/ # dengan konversi url ke lokal
@abdulhadad
abdulhadad / windows - no hyper v boot.md
Last active May 26, 2019 05:27
Pilihan Windows 10 boot tanpa Hyper-V dan dengan Hyper-V

Pilihan Windows 10 boot tanpa Hyper-V dan dengan Hyper-V

Tujuan

  • Menjalankan Virtualbox atau VMWare yang bentrok dengan Hyper-V jalan

Buat Opsi tanpa Hyper-V dan dengan Hyper-V

# buka cmd mode privileged