Skip to content

Instantly share code, notes, and snippets.

@Caesim404
Caesim404 / steamns
Created November 17, 2016 17:19
Helps run wine steam (or another program) in a network namespace.
#!/bin/bash
ns=${ns:-steamns}
veth0=${veth0:-veth0}
veth1=${veth1:-veth1}
addr0=${addr0:-10.1.1.1/24}
addr1=${addr1:-10.1.1.2/24}
sudo=${sudo:-sudo}
dev=${dev:-`ip route show | awk 'NR==1 { print $5 }'`}
@bbx10
bbx10 / ESPWebSock.ino
Last active June 5, 2024 20:16
ESP8266 Web server with Web Socket to control an LED
/*
* ESP8266 Web server with Web Socket to control an LED.
*
* The web server keeps all clients' LED status up to date and any client may
* turn the LED on or off.
*
* For example, clientA connects and turns the LED on. This changes the word
* "LED" on the web page to the color red. When clientB connects, the word
* "LED" will be red since the server knows the LED is on. When clientB turns
* the LED off, the word LED changes color to black on clientA and clientB web