Skip to content

Instantly share code, notes, and snippets.

View devisnotnull's full-sized avatar
🎯
Focusing

Alex Brown @lextech devisnotnull

🎯
Focusing
View GitHub Profile
Proxmox on Debian at Hetzner with multiple IP addresses
AUGUST 9, 2016 BY FLORIAN BEER·15 COMMENTS
I’ve spent most of my day today trying a plethora of different ways on how to configure Proxmox on a Hetzner server with multiple IP addresses. Most of the tutorials I found online gave a good deal of information but where lacking in one or two crucial details. Shortly before I was ready to throw my computer out of the window, I had success and managed to get everything set up the way I wanted it.
This aims to be the definitive guide on how to accomplish the aforementioned task. When ready the setup includes the following features:
Host bound to main IPv4 address, that comes with the server (and one of the 18,446,744,073,709,551,616 included IPv6 addresses)
Every IPv4 address of a separately delegated subnet usable for virtual machines
Internal private network for inter-virtual machine communication and non publicly accessible VMs
@devisnotnull
devisnotnull / msys_hetzner-etc_network_interfaces
Created November 11, 2016 19:15 — forked from jpawlowski/msys_hetzner-etc_network_interfaces
Debian network configuration for Proxmox VE server running on a Hetzner host
# /etc/network/interfaces
#
auto lo
iface lo inet loopback
# device: eth0
iface eth0 inet manual
# IPv4 bridge
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!)
@devisnotnull
devisnotnull / _guards.ts
Created October 7, 2016 17:56
Adding guards to Angular 2 routes
import { Router, CanActivate } from '@angular/router';
import { Injectable } from '@angular/core';
/** **/
class UserToken {}
/** **/
class Permissions {
canActivate(user: UserToken, id: string): boolean {
return true;
}
@devisnotnull
devisnotnull / introrx.md
Created October 7, 2016 01:11 — forked from secdata/introrx.md
The introduction to Reactive Programming you've been missing
@devisnotnull
devisnotnull / gist:ab2c806bc26734945abe28d724c62b5c
Created September 29, 2016 20:07
Python, XML-to-DICT. Really simple yet effective
def etree_to_dict(t):
"""
A simple yet really powerful function for converting XML into a dict,
Faster than xmltodict
http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
:param t:
:return:
"""
d = {
t.tag: {} if t.attrib else None
@devisnotnull
devisnotnull / mongodb-objectid-type-adapter-GSON.java
Last active January 7, 2019 22:31
MongoDB ObjectID Gson TypeAdapter
import java.io.IOException;
import java.lang.reflect.Type;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import org.bson.types.ObjectId;
import com.google.gson.*;
/**
* Created by alexb on 12/05/15.
git add *
git commnit -m "Message"
git push origin master
--Simple git commands once origin already established
@devisnotnull
devisnotnull / gist:5292672
Created April 2, 2013 14:32
List Of All Podcast Categories
- Arts:
- Design
- Fashion & Beauty
- Food
- Literature
- Performing Arts
- Spoken Word
- Visual Arts
- Business:
- Business News