Skip to content

Instantly share code, notes, and snippets.

View matthiasguentert's full-sized avatar
💭
Typing...

Matthias Güntert matthiasguentert

💭
Typing...
View GitHub Profile
# https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_tutorials.html
import numpy as np
import cv2
from openni import openni2
from openni import _openni2 as c_api
from imutils.video import FPS
openni2.initialize("C:/Dev/Downloads/Orbbec/OpenNI_2.3.0.43/Windows/OpenNI-Windows-x64-2.3/Redist")
if openni2.is_initialized() != True:
# https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_tutorials.html
# Contains Enumerations for ONI devices
# http://docs.ros.org/kinetic/api/libfreenect/html/OniCEnums_8h.html#ac214498322fe73b8c454335aeb7f289f
# List of mat types in opencv
# http://ninghang.blogspot.com/2012/11/list-of-mat-type-in-opencv.html
import sys
from datetime import datetime
import sys
from datetime import datetime
import numpy as np
import cv2
from openni import openni2
from openni import _openni2 as c_api
openni2.initialize("C:/Dev/Downloads/Orbbec/OpenNI_2.3.0.43/Windows/OpenNI-Windows-x64-2.3/Redist")
device = openni2.Device.open_any()
@matthiasguentert
matthiasguentert / azure-app-service-cheat-sheet.md
Last active April 26, 2021 10:58
Azure App Service - Azure CLI Cheat Sheet

Deploy a custom docker image

az webapp config container set -r https://my-acr.azurecr.io -i my-acr.azurecr.io/dotnet/samples:aspnetapp -n app-my-app-poc -g rg-my-app-poc -u my-acr -p ...

Restart webapp

az webapp restart -n app-my-app-poc -g rg-my-app-poc

Real-time logging on container

az webapp log config --name app-myapp --resource-group rg-myapp --docker-container-logging filesystem az webapp log tail --name app-myapp --resource-group rg-myapp

@matthiasguentert
matthiasguentert / azure-container-registry-cheat-sheet.md
Last active April 23, 2021 11:16
Azure Container Registry - Azure CLI Cheat Sheet

Import images from hub.docker.io into your ACR

az acr import -n myacr --source docker.io/library/node:latest

Create firewall rule to allow service endpoint connections

Additional notes:

  • ACR service endpoints can only be consumed by AKS clusters and VMs
az acr network-rule add -n myacr --vnet-name vnet-myvnet --subnet snet-my-subnet-with-app-services
@matthiasguentert
matthiasguentert / docker-cheat-sheet.md
Last active December 7, 2021 10:23
Docker Cheat Sheet

Push image to Azure Container Registry

az login 
az acr login --name myregistry
docker tag killerapp/backend myregistry.azurecr.io/killerapp/backend
docker push myregistry.azurecr.io/killerapp/backend

Verify a docker installation

@matthiasguentert
matthiasguentert / git-cheat-sheet.md
Last active March 14, 2022 19:46
Git Cheat Sheet

Configuration

Edit via editor

# <project\.git\config 
git config --edit

# C:\Users\%username%\.gitconfig
git config --global --edit
@matthiasguentert
matthiasguentert / postgres-cheat-sheet.md
Last active March 9, 2022 09:10
Postgres Cheat Sheet
@matthiasguentert
matthiasguentert / bicep-cheat-sheet.md
Last active October 1, 2021 14:26
Bicep Cheat Sheet

Concatenate two or more arrays

var a1 = [
  'a'
  'b'
]

var a2 = [
  'c'
]
@matthiasguentert
matthiasguentert / python-cheat-sheet.md
Last active October 15, 2021 10:02
Python Cheat Sheet

Module Management

Get list of outdated modules

pip list --outdated

Install modules

py -m pip install pyodbc
pip install pyodbc