Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
munching code

Jatin K Malik jatinkrmalik

👨‍💻
munching code
View GitHub Profile
@HikariKnight
HikariKnight / proxmox-nginx-subdir-proxy.md
Last active Aug 12, 2021
proxmox nginx proxy subdirectory
View proxmox-nginx-subdir-proxy.md

So I have spent my last 4 days to try get proxmox working with an nginx proxy. Due to how proxmox is built up I had to get clever with some rewrite, break some nginx rules and spend sleepless nights awake to try figure this out (to be honest I am no genius on web servers as I rarely have to touch them). Plus it seems like nobody (from my googling) had managed to set proxmox up to work behind a proxied subdir, understandably so as some of the html generated uses absolute paths for sources instead of relative paths and you need to deal with that.

This is the proxmox.conf file i ended up making (Replace all instances of pve.local:8006 with your internal proxmox ip and port) And replace publicwebsite.com with your website domain

@Kartones
Kartones / postgres-cheatsheet.md
Last active Dec 3, 2021
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@thearn
thearn / opencv-python-ipcam.py
Last active Nov 2, 2021
python-opencv ip camera example
View opencv-python-ipcam.py
import base64
import time
import urllib2
import cv2
import numpy as np
"""
Examples of objects for image frame aquisition from both IP and