Skip to content

Instantly share code, notes, and snippets.

View damarowen's full-sized avatar
🎯
Focusing

Damar Owen damarowen

🎯
Focusing
View GitHub Profile
@damarowen
damarowen / KILL PORT IN WINDOWS
Last active February 27, 2023 10:22
KILL PORT IN WINDOWS
tasklist | find "node.exe"
taskkill /PID 18836 /F
#find port in local
netstat -ano | findstr :6379
kill all go
taskkill /f /im go.exe
@damarowen
damarowen / docker redis and redis-gui-commander
Created February 8, 2023 15:37
docker redis and redis-gui-commander
version: '3'
# this name will be useful for (e.g.) "docker compose -p"
name: redis-local
services:
redis:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
@damarowen
damarowen / Docker kibana and ES
Created January 9, 2023 08:33
Docker kibana and ES
version: '3'
name: es_kibana
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.3.2
container_name: elasticsearch
restart: always
volumes:
- ./es_data:/usr/share/elasticsearch/data
{"version":1,"resource":"file:///Users/fdn-damar/Desktop/fdn-profile/src/config/database.ts","entries":[{"id":"Ycky.ts","timestamp":1652708009131},{"id":"17PU.ts","source":"undoRedo.source","timestamp":1652708269904}]}
@damarowen
damarowen / script socket dengan html
Last active December 5, 2021 03:47
script socket dengan html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/static/style.css">
<title>Pub Chat</title>
</head>
<body>
ERROR Error: certificate has expired
at TLSSocket.onConnectSecure (_tls_wrap.js:1498:34)
at TLSSocket.emit (events.js:315:20)
at TLSSocket.EventEmitter.emit (domain.js:485:12)
at TLSSocket._finishInit (_tls_wrap.js:940:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:698:12) {
code: 'CERT_HAS_EXPIRED',
check this link
Why would you use this?
Promise.any() lets you run a list of promises
Concurrently, ignoring any that reject unless all of the promises reject
Promise.any([
fetch("https://google.com/").then(() => "google"),
fetch("https://apple.com").then(() => "apple"),
fetch("https://microsoft.com").then(() => "microsoft"),
])