Skip to content

Instantly share code, notes, and snippets.

View rmohta's full-sized avatar
🎯
Focusing

Rohit rmohta

🎯
Focusing
View GitHub Profile
@rmohta
rmohta / captureImage.py
Created April 26, 2018 10:19
Capture image from Camera
import pygame
import pygame.camera
from pygame.locals import *
import pygame.image
# pip install Pygame
def list_cameras():
camlist = pygame.camera.list_cameras()
if camlist:
for acam in camlist:
@rmohta
rmohta / armeria-main-error.log
Created August 10, 2019 16:20
Error starting example/annotated-http-service/Main
commit b545a9d06ac9f5a861de1b92ce75bd0ebcc31242 (HEAD -> master, origin/master, origin/HEAD)
Author: Trustin Lee <t@motd.kr>
Date: Sat Aug 10 09:37:37 2019 +0900
Update the project version to 0.90.1-SNAPSHOT
======================
** Change to Main class
static Server newServer(int port) throws CertificateException, SSLException {
final ServerBuilder sb = new ServerBuilder();
@rmohta
rmohta / envoy-get-cluster-hostnames.md
Last active July 30, 2021 17:48
Envoy: Get hostnames for configured clusters

When none of the CLI tools like istioctl or glooctl are available, use wget/curl | jq/grep to find all the hostnames configured in Envoy

Get clusters

Assuming Envoy admin port is 19000. Invoke below script to invoke Envoy admin API

$ cat collect-gloo-upstream.sh
#!/usr/bin/env sh
kubectl -n $1 exec -it $2  -- wget -O - http://127.0.0.1:19000/clusters?format=json