Skip to content

Instantly share code, notes, and snippets.

View svrooij's full-sized avatar

Stephan van Rooij svrooij

View GitHub Profile
@bgrewell
bgrewell / udm-pro-he-ipv6-setup.md
Last active October 27, 2024 19:26
This gist describes how to setup a hurricane electric (TunnelBroker) IPv6 tunnel on a Ubiquiti Unifi Dream Machine Pro

Setup IPv6 Tunnel on Unifi Dream Machine Pro

Enable SSH

TODO

Configure To Dream Machine Over SSH

SSH to your UDM

@alexellis
alexellis / sponsors.go
Last active August 8, 2024 18:11
sponsors.go - query whether a GitHub user is your sponsor at a given tier (dollar amount)
// LICENSE for this file: MIT
// Copyright: Alex Ellis, OpenFaaS Ltd 2020
// Do not remove this notice
package handlers
import (
"context"
"encoding/json"
"os"
@rsms
rsms / EventListener.d.ts
Created July 12, 2017 17:49
Better EventEmitter TypeScript interface
export class EventEmitter<Events, K = keyof Events|symbol> {
addListener(event: K, listener: (...args: any[]) => void): this;
on(event: K, listener: (...args: any[]) => void): this;
once(event: K, listener: (...args: any[]) => void): this;
removeListener(event: K, listener: (...args: any[]) => void): this;
removeAllListeners(event?: K): this;
setMaxListeners(n: number): this;
getMaxListeners(): number;
listeners(event: K): Function[];
emit(event: K, ...args: any[]): boolean;
@DeanCording
DeanCording / Template_ESP8266.ino
Last active April 29, 2023 03:23
ESP8266 Arduino project template with optional OTA firmware update
/**
* ESP8266 project template with optional:
* - WiFi config portal - auto or manual trigger
* - OTA update - Arduino or web server
* - Deep sleep
* - Process timeout watchdog
*
* Copyright (c) 2016 Dean Cording <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@boneskull
boneskull / proxy
Created January 26, 2016 00:43
example nginx config to reverse proxy a node-red server (websocket support)
server {
listen 80;
server_name your_server_name;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://localhost:1880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;