Skip to content

Instantly share code, notes, and snippets.

View linuxluigi's full-sized avatar

Steffen Exler linuxluigi

View GitHub Profile
@linuxluigi
linuxluigi / __main__.py
Created February 28, 2017 08:16
Python __main__.py parser example
import argparse
# import data2tabshop
# from data2tabshop import __version__
__version__ = '0.1.0'
__author__ = u'Steffen Exler'
def get_parser():
@linuxluigi
linuxluigi / WhoIsDomain.py
Created July 4, 2018 15:16
Python CLI doimain ip request
import sys
import socket
if len(sys.argv) > 1:
hostname = str(sys.argv[1])
print("requested Domain: %s" % hostname) # show domain name
try:
ip = socket.gethostbyname(hostname)
print("IP: %s" % ip)
except:
import psycopg2
from psycopg2.extensions import connection, cursor
import sys
import datetime
class DestDB:
dbname = "gis"
user = "docker"
host = "localhost"
password = "Dyx8lXMKIGggiQXTzSrAuZ3UsDt8YmLy53WEIAga6EkkVc2GK9lmiRfJxzx7Oahw"