Skip to content

Instantly share code, notes, and snippets.

View mvetsch's full-sized avatar
🔩
....

mvetsch

🔩
....
  • Rapperswil, Switzerland
View GitHub Profile
@mvetsch
mvetsch / create-name.sh
Last active March 9, 2016 23:04
Use docker's fantastic namegenerator
#!/bin/bash
wget https://raw.githubusercontent.com/docker/docker/master/pkg/namesgenerator/names-generator.go 2> /dev/null
go get "github.com/docker/docker/pkg/random"
go get "github.com/docker/docker/pkg/namesgenerator"
cat > get-generated-name.go << EOF
@mvetsch
mvetsch / gist:9bfdee7c56140eae2baa0be711fc8ded
Last active February 6, 2024 08:36
Wireless configuration with nmcli (NetworkManager ) for ETHZ (eth / eduroam)
nmcli connection add type wifi con-name eduroam ifname wlp3s0 ssid "eduroam" -- wifi-sec.key-mgmt wpa-eap 802-1x.eap ttls 802-1x.identity [CUT]@student-net.ethz.ch 802-1x.phase2-auth mschapv2 802-1x.domain-suffix-match radius-service.ethz.ch
nmcli connection add type wifi con-name eth ifname wlp3s0 ssid "eth" -- wifi-sec.key-mgmt wpa-eap 802-1x.eap ttls 802-1x.identity [CUT]@student-net.ethz.ch 802-1x.phase2-auth mschapv2 802-1x.domain-suffix-match radius-service.ethz.ch
# activate with
nmcli connection up eduroam --ask
nmcli connection up eth --ask
import socket
import sys
def recv():
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_ICMP)
counter = 0;
while True:
data, src = s.recvfrom(1508)
// remove paywall
document.getElementById("paywall_container").remove()