Skip to content

Instantly share code, notes, and snippets.

View blafasel42's full-sized avatar

Gaylord Aulke blafasel42

View GitHub Profile
error_log /var/log/nginx/error.log debug;
events { }
http {
proxy_cache_path cache/ keys_zone=auth_cache:1m;
# The application listens on port 9000 as implemented
# in service.py.
upstream backend {
security:
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
...
firewalls:
# This firewall is used to handle the actual login and is used as an endpoint for SSO-Proxy.
authentication:
pattern: ^/(auth|login|logout)
@blafasel42
blafasel42 / AuthController.php
Created July 6, 2020 19:53
Controlle for Nginx sub request authentication
<?php
namespace App\Controller;
use ...
/**
* Class AuthenticationController
*
* @package User\UserBundle\Controller
@blafasel42
blafasel42 / initkube.sh
Created June 24, 2021 12:00
set KUBECONFIG to include all config files in ~/.kube
export KUBECONFIG=$(find ~/.kube -mindepth 1 -maxdepth 1 -type f -name config* -printf '%h/%f:')
@blafasel42
blafasel42 / annotate.py
Created May 4, 2024 13:51
draw bboxes on a video
Here is a Python program that uses OpenCV to generate a video with bounding boxes and lines for the driven trajectories on top of the original video footage:
```
import cv2
import numpy as np
# Load the MOT challenge data file
mot_data = []
with open('mot_data.txt', 'r') as f:
for line in f:
frame, id, x, y, w, h, _, _, _, _ = line.strip().split(',')