First Friday script updated and simplified

NOTE: The latest version of this script can always be found here: https://github.com/PHX2600/FirstFriday

With this update I have drastically reduced and simpified the code to produce the same results. I did some rigorous testing of my own to make sure this script will calculate the correct date, but that doesn’t mean it’s bullet-proof. If you find a bug, please email me so I can fix it.

first-friday.php

Somewhere along the lines of moving my blog from one site/platform to
another I lost this sample of code.  See link above for the latest 
version of this script.

Calculate the first Friday of next month with PHP

UPDATE: This script has been updated, see: https://github.com/PHX2600/FirstFriday

While developing phx2600.org, I ran into a slight dilemma. The PHX2600 meetings occur once a month on the first Friday of every month, and we wanted to display that on the site. However, it was becoming a tedious chore to change the date once a month manually. So, being the automation addict I am, I thought, why not write a script. So one night I hammered out the following script that will calculate the first Friday of next month:

Continue reading

IP Uploader – Python Script (.py)

NOTE: This script can now be found here: https://gist.github.com/826108

This is my first python script I ever wrote. This script connects to whatismyip.com, fetches the external IP address of the network you are on, puts it into a text file and uploads it via FTP to any server you want.

At home I have Cox, therefore I have a dynamic IP. Even though this IP only changes about once every month, I got sick of needing to connect to my home computer via VNC and not being able because my IP had changed. Therefore I created the following script and set up a scheduled task on my home computer to run this script every hour.

Continue reading