Skip to content

Instantly share code, notes, and snippets.

stif /
Created October 27, 2023 10:45
Unifi VLAN Creation Automation

Selenium Webdriver

with Selenium Webdriver you can automate tasks on a webpage. In this Scenario Selenium opens chromium webbroser, Logs into the Unifi Controller WebUI, read the config.csv file and add a VLAN for every Line in the CSV File.

npm install
USER=myUnifiUser PASS=myUnifiPass node index.js
create Vlan: V13-VLAN13 Name
create Vlan: V14-VLAN14 Name
stif /
Last active April 18, 2023 09:17
APU2 Ubuntu Installation
PARTSIZE_SWAP="12" # root+swap (eg 4G root + 4G swap = 8G)
stif / http-server.js
Last active April 1, 2024 04:10
node.js HTTP Server
import * as http from 'http'
import { URL } from 'url'
import { stat, readFile } from 'fs/promises';
import { join, extname } from 'path';
// you can pass the parameter in the command line. e.g. node http_server.js 3000
const port = process.argv[2] || 9000;
// maps file extention to MIME types
#include <Basecamp.hpp>
Basecamp iot;
void onMqttConnect(bool sessionPresent) {
Serial.println("Connected to MQTT.");
Serial.print("Session present: ");
uint16_t packetIdSub = iot.mqtt.subscribe("test/lol", 2);
Serial.print("Subscribing at QoS 2, packetId: ");

cnt-host Interfaces


auto enp2s0
iface enp2s0 inet dhcp

auto enp2s0.10
iface enp2s0.10 inet dhcp
stif / open3a-phpinfo.html
Created November 19, 2017 20:08
Open3A phpinfo
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0026) -->
<html xmlns=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {background-color: #fff; color: #222; font-family: sans-serif;}
pre {margin: 0; font-family: monospace;}
a:link {color: #009; text-decoration: none; background-color: #fff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse; border: 0; width: 934px; box-shadow: 1px 2px 3px #ccc;}
.center {text-align: center;}
stif / docker-compose.yaml
Created August 22, 2017 20:15
c´t Umbauanleitung Docker-Compose File
version: '2.1'
- subnet:
stif / gist:d03e427d33334d649dc944bc40138e9d
Created June 27, 2016 09:05
OpenELEC 6.0.3 Build error after libcec update
UNPACK libcec
APPLY PATCH (common) /home/stif/Dokumente/OpenELEC/
can't find file to patch at input line 30
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|From a7f3315333c1a79259a763c6542a6cd71855b357 Mon Sep 17 00:00:00 2001
|From: Stefan Saraev <>
|Date: Thu, 7 May 2015 11:35:04 +0300
|Subject: [PATCH] imx support