Skip to content

Instantly share code, notes, and snippets.

View khafidprayoga's full-sized avatar

Khafid Prayoga khafidprayoga

  • 09:28 (UTC +07:00)
View GitHub Profile
@khafidprayoga
khafidprayoga / gitio.md
Last active October 10, 2021 06:37
Github URL Shortener

git.io is a url shortener for github.com hostname

  • URL without custom text
     curl -i https://git.io -F "url=https://github.com/khafidprayoga/repo.git"
    
  • URL with custom text
    curl -i https://git.io -F "url=https://github.com/khafidprayoga/repo.git" 
    -F "code=myshorturl"
    
@khafidprayoga
khafidprayoga / MathBasic.js
Created October 4, 2021 06:39
Menuliskan Pengujian dan Kode MathBasic
class inputValidator {
static paramsLengthCheck(args) {
if (args.length !== 2) {
throw new Error('add function accept 2 params.');
}
}
static isNumber(params) {
if (typeof params !== 'number') {
throw new Error('params must be a valid number');
@khafidprayoga
khafidprayoga / lapar.js
Created August 30, 2021 07:14
Indomie Async/Await/Promise
/*
MEMASAK MIE INSTAN DENGAN PROMISE
menyiapkan air mendidih
menyiapkan piring
membuka bungkus mie
menaruh mie ke piring
menuangkan air mendidih ke piring
wait 3 detik
siapkan semua bumbu