Skip to content

Instantly share code, notes, and snippets.

View nh2's full-sized avatar

Niklas Hambüchen nh2

View GitHub Profile
@nh2
nh2 / route53.py
Last active October 9, 2023 17:59 — forked from rmarchei/route53.py
route53 hook for dehydrated - python2 / python3 + boto2 version. Tested on Ubuntu 16.04
#!/usr/bin/env python3
# How to use:
#
# Ubuntu 16.04: apt install -y python-boto OR apt install -y python3-boto
#
# Specify the default profile on aws/boto profile files or use the optional AWS_PROFILE env var:
# AWS_PROFILE=example ./dehydrated -c -d example.com -t dns-01 -k /etc/dehydrated/hooks/route53.py
#
# Manually specify hosted zone:
@nh2
nh2 / fish_git_ps1.fish
Last active August 29, 2015 14:25 — forked from emcmanus/gist:2894558
Functoin for the fish shell that gets the current git branch + if a merge/rebase etc. is in progress (port of GIt's __git_ps1); adapted to work for newer versions of fish (e.g. 2.2.0)
# Functoin for the fish shell that gets the current git branch + if a merge/rebase etc. is in progress (port of GIt's __git_ps1); adapted to work for newer versions of fish (e.g. 2.2.0)
function __git_ps1
set -l g (git rev-parse --git-dir ^/dev/null)
if [ -n "$g" ]
set -l r ""
set -l b ""
if [ -d "$g/rebase" ]
if [ -f "$g/rebase/rebasing" ]
@nh2
nh2 / gist:19b892f6b2c5e3998eba
Last active August 29, 2015 14:06 — forked from chpatrick/gist:a497d89f74016774fb83
Patrick-Calibrator
import numpy as np
from primesense import openni2
import numpy.ctypeslib
import numpy
import cv2
# Checkerboard
# https://github.com/obviousjim/DepthKit/blob/master/chessboard_a3.pdf?raw=true
#
# After printing, don't forget to adjust "size of the squares in mm"