This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mh=Object.defineProperty,yh=Object.defineProperties;var bh=Object.getOwnPropertyDescriptors;var Ma=Object.getOwnPropertySymbols;var _h=Object.prototype.hasOwnProperty,vh=Object.prototype.propertyIsEnumerable;var La=Math.pow,Na=(Ce,fe,ue)=>fe in Ce?mh(Ce,fe,{enumerable:!0,configurable:!0,writable:!0,value:ue}):Ce[fe]=ue,Y=(Ce,fe)=>{for(var ue in fe||(fe={}))_h.call(fe,ue)&&Na(Ce,ue,fe[ue]);if(Ma)for(var ue of Ma(fe))vh.call(fe,ue)&&Na(Ce,ue,fe[ue]);return Ce},st=(Ce,fe)=>yh(Ce,bh(fe));var G=(Ce,fe,ue)=>new Promise((te,Xe)=>{var Ie=Le=>{try{Ye(ue.next(Le))}catch(le){Xe(le)}},or=Le=>{try{Ye(ue.throw(Le))}catch(le){Xe(le)}},Ye=Le=>Le.done?te(Le.value):Promise.resolve(Le.value).then(Ie,or);Ye((ue=ue.apply(Ce,fe)).next())});(function(){"use strict";var Ce=document.createElement("style");Ce.textContent=`p{margin:0;padding:0}.mantap{color:red;font-size:24px;font-weight:700}.spotlight[data-v-8842d7a0]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"vacancy_id": "A2BB5F1CBD67772C9969AA06EB251590", | |
"tenant_id": "D1A22EE407325571D847AD68AFBE355F", | |
"vacancy_name": "General Banking Staff", | |
"tenant_name": "PT Bank Tabungan Negara (Persero) Tbk", | |
"vacancy_base_url": "https://rekrutmenbersama2024.fhcibumn.id/", | |
"jenjang": null, | |
"stream_name": "Bisnis Niaga / Pemasaran", | |
"jurusan_name": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// annotation - keep wide | |
const scores: Record<string,number> = {} | |
scores.maths = 99 // no autocomplete | |
// satisfies - keep narrow | |
const configs = { | |
width: '100px', | |
isDark: true | |
} satisfies Record<string, string | boolean> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Select matched object | |
// Bad implementation | |
// type ApiResponse { | |
// state: 'success' | 'failed' | |
// data?: { name: string } | |
// error?: { message: string } | |
// } | |
type ApiResponseSuccess = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mapping | |
enum Words { | |
One = 'one', | |
Two = 'two', | |
Three = 'three', | |
} | |
enum Numbers { | |
One = 1, | |
Two = 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getValue = (path, obj) => { | |
const newPath = path.replace(/\]/g, ''); | |
const arrayPath = newPath.split(/[\[\.]+/) || newPath; | |
return arrayPath.reduce((obj, k) => (obj ? obj[k] : obj), obj); | |
}; | |
const doFilterObject = (rawData, filterKey) => | |
filterKey.reduce((acc, cur) => { | |
const isNested = new RegExp(/\[|\./, 'g').test(cur); | |
const newData = isNested ? getValue(cur, rawData) : rawData[cur]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chatIdList = ['xxx','yyy','zzz']; | |
const botToken = 'xxx'; | |
const message = 'your message here'; | |
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
(async () => { | |
for (let i = 0; i < chatIdList.length; i++) { | |
fetch(`https://api.telegram.org/bot${botToken}/sendMessage?chat_id=${chatIdList[i]}&text=${message}&parse_mode=markdown`) | |
.then(response => response.json()) | |
.then(response => { | |
console.log({ status: `${chatIdList[i]}: ${response.ok}` }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place it on your workspace .vscode folder | |
{ | |
// EDITOR | |
// ---------------------------------------- | |
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | |
"[javascript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, | |
"[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, | |
"[vue]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, | |
"[scss]": { "editor.defaultFormatter": "stylelint.vscode-stylelint" }, | |
"[css]": { "editor.defaultFormatter": "stylelint.vscode-stylelint" }, |