Skip to content

Instantly share code, notes, and snippets.

View todd-dsm's full-sized avatar
🏗️
Just trying stuff...

Todd Thomas todd-dsm

🏗️
Just trying stuff...
  • smpl-cloud
  • SoCal
View GitHub Profile
@todd-dsm
todd-dsm / app.py
Created March 20, 2017 21:36 — forked from nZac/app.py
import flask
import socket
import fcntl
import struct
app = flask.Flask(__name__)
# http://stackoverflow.com/questions/24196932/how-can-i-get-the-ip-address-of-eth0-in-python
def get_ip_address(ifname):