Skip to content

Instantly share code, notes, and snippets.

View janjagusch's full-sized avatar

Jan-Benedikt Jagusch janjagusch

View GitHub Profile
#
# CCS811_RPi
#
# Petr Lukas
# July, 11 2017
#
# Version 1.0
import struct, array, time, io, fcntl
@martinvirtel
martinvirtel / README.md
Last active December 10, 2023 07:46
How to connect Ubuntu 16.04 with @DB_bahn's WifiOnIce

HOWTO: wifionice.de on Ubuntu 16.04

My Ubuntu 16.04 did not work with @DB_Bahn's Wifi network out of the box. Here's what I did:

Step 1 Connect to the WLAN wifionice.

Step 2. Fire up your browser and open http://www.wifionice.de - at this point, I got an "unable to connect" message.

Step 3.. Open up a terminal (Ctrl-Alt-T on Ubuntu) and find out the IP address of www.wifionice.de

@gabrielfalcao
gabrielfalcao / get-free-tcp-port.py
Created October 31, 2015 18:30
Getting a random free tcp port in python using sockets
# Getting a random free tcp port in python using sockets
def get_free_tcp_port():
tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp.bind(('', 0))
addr, port = tcp.getsockname()
tcp.close()
return port