Instead of using ads, I am having you mine for crypto currency to support this site. Here are your stats:

You can start or stop at anytime but please wait for some accepted hashes before you do.

Visit Coin Hive to learn more about how this works

hot Archives - TheLair.me

hot Archive

3

Quick Python Workaround For Dynamic DNS

mailboxx
As many of you know I have recently moved my website onto a personal Raspberry Pi server conveniently located in my bedroom. Well, to make a long story short I have a dynamic IP address which means that it switches once in a while and if I’m not at home to check the new address with ipconfig and change it through my Domain Name dash then my site is down until I can do so. If you have ever had this happen to you then you know it’s very annoying.

You used to be able to enlist in the services of DynDNS, No-IP, and ZoneEdit for free, but those days are gone and I refuse to pay $30 a year for them to switch my IP perhaps 2 to 4 times so I decided to come up with a little solution of my own. I wrote a script in Python that is meant to be run automatically at the startup of the server. Every 5 minutes it will check if my IP is still the same and if it detects a change it emails me directly to my phone where I can simply go to my Domain Name dash and change my @ address. This means that I will have approximately 5 – 10 minutes of downtime whenever my IP changes and I find this to be a perfectly acceptable solution.

The code is free to use and distribute as you would like. Thanks and enjoy!

 

import smtplib
import urllib
import re
import time

 

# Find Beginning IP at program start
url = “http://checkip.dyndns.org”
##print url
request = urllib.urlopen(url).read()
startIP = re.findall(r”\d{1,3}\.\d{1,3}\.\d{1,3}.\d{1,3}”, request)
##print “your start IP Address is: “, str(startIP)

X = 1

while X == 1:

oldIP = startIP

# Find current IP
url = “http://checkip.dyndns.org”
##print url
request = urllib.urlopen(url).read()
currentIP = re.findall(r”\d{1,3}\.\d{1,3}\.\d{1,3}.\d{1,3}”, request)
##print “your current IP Address is: “, str(currentIP)

# Compare old IP to current IP
if str(oldIP) != str(currentIP):
fromaddr = ‘thelairdotme@gmail.com’
toaddrs = ‘thelairdotme@gmail.com’
msg = ‘Your I.P. has changed to ‘+ str(currentIP) +’. Make sure to update @ address in GoDaddy DNS setup!’

# Credentials for Gmail
username = ‘YourNameHere’
password = ‘XXXXXXXXX’

# The actual mail send
server = smtplib.SMTP(‘smtp.gmail.com:587’)
server.ehlo()
server.starttls()
server.login(username,password)
server.sendmail(toaddrs, fromaddr, msg)
server.quit()

# Update
startIP = currentIP

# Wait 5 minutes between checks
time.sleep(300)

 

0

Sit Down MAME Rocket Fighter By Mailmann006

rocket fighterI thought perhaps today I would do a quick story on someone I’ve never really written about before… me. As most people who visit this site know, I am the owner/operator of TheLair.me, but in my spare time I like to do a lot of other things like modding systems, building MAME cabinets, and pretty much anything else that has to do with electronics and PC’s.

Today i’d like to show you guys my latest MAME creation. It’s a sit-in rocket cockpit MAME cabinet. It will be sporting a Thrustmaster HOTAS flight stick, a gaming chair complete with 5.1 surround sound and active vibration, subwoofers, and a lot more once it’s finished. I went green on this PC build to save energy and be more efficient so I’m using an Intel Atom D270S mini-motherboard, 120GB Crucial SSD, 700 watt illuminated Apevia power source, and a Zotac GeForce GT 610 PCI graphics card. I’ll also be using a lot of illumination including fans and other stationary neons.

So far it’s been coming together pretty much how I wanted it to. It’s been too cold to paint the outside, but once I do i’d like to have someone airbrush the outside with perhaps a Halo theme of some sort. I was thinking of making it look like one of the Marine drop ships. The system runs well and plays everything up to and including PS1 and N64 without any slowdown. Once I seal off the top/front of the cab, the shelf with the PC and lighting on it will be covered with plexiglass and a swinging “hood” that you can see through so I can open it up easily if I need to get in there. Plus I think it’s cool that when people ask me whats in it I can just “Pop the hood”.

There are a few things I haven’t quite figured out yet. The door for instance. I was originally thinking of making some kind of sliding apparatus or possibly even a Lamborghini style door, but I think it would be too heavy and might prevent it from fitting through a standard size door frame. I may just go with the rod and curtain after all. I’d also like to cut a few holes in the back and add some more big fans to emulate thrusters. There’s still a lot to be done but I think it looks pretty good so far. Please keep in mind a lot of these pics were taken before everything was fitted, sanded, and primed. The images where the cab is white are the more recent images that are lacking any gaps and mistakes in the woodworking. Feel free to leave any comments or feedback as it is appreciated.