Skip to content

Instantly share code, notes, and snippets.

@zoranzaric
zoranzaric / WireGuard-site-to-site.md
Created January 25, 2019 09:30
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@zoranzaric
zoranzaric / example.timeclock
Last active May 8, 2018 21:35
Run with: hledger -f example.timedot bal -O csv -p tomorrow -N | python timeclock.py "2018/05/08"
i 2018/05/08 06:15 Some:Project
o 2018/05/08 09:00

Keybase proof

I hereby claim:

  • I am zoranzaric on github.
  • I am zoranzaric (https://keybase.io/zoranzaric) on keybase.
  • I have a public key ASAINYmhErNwy8W0cCtTnN-JX_7C8vW9t8CYk4rksKjQfQo

To claim this, I am signing this object:

@zoranzaric
zoranzaric / README.md
Last active December 21, 2015 16:19
Zoran's D3.js playground

This is my little D3.js playground

import re
from pyvirtualdisplay import Display
from selenium import webdriver
count_re = re.compile('(\d+) people')
class selenium_firefox():
def __enter__(self):
display, browser = self.setup()
#################################################
# rsnapshot.conf - rsnapshot configuration file #
#################################################
# #
# PLEASE BE AWARE OF THE FOLLOWING RULES: #
# #
# This file requires tabs between elements #
# #
# Directories require a trailing slash: #
# right: /home/ #
make latexpdf
sphinx-build -b latex -d _build/doctrees . _build/latex
Running Sphinx v1.0.8
To build the documentation, The distribution information of Flask
Has to be available. Either install the package into your
development environment or run "setup.py develop" to setup the
metadata. A virtualenv is recommended!
Flask==0.8
Flask-Admin==0.1.4
Flask-SQLAlchemy==0.15
Flask-WTF==0.5.2
Jinja2==2.6
SQLAlchemy==0.7.2
WTForms==0.6.3
Werkzeug==0.8.1
wsgiref==0.1.2
#!/bin/sh
LOCAL_PORT=$1
REMOTE_USER=tunnel
REMOTE_HOSTNAME=schlam.be
if [ "$LOCAL_PORT" == "" ]; then
echo "No local port specified" > /dev/stderr
exit 1
fi
a = ('val', 1, 1)
b = ('list', 2, [a, a])
c = ('val', 3, 2)
l = [a,b,a,c]
class MySet():
def __init__(self):
self._data = set()
def __contains__(self, value):
return (value in self._data)