If you rely on remote access to your home computer but cannot be bothered with having to record your external IP each time then you can use DynDNS or No-IP, but they rely on installing their own tools to update their systems, and in some cases, want you to pay for the service. I have found a (somewhat convoluted) way of an alternative means, which should work under most Linux environments.
Install the packages "at" and "grive" (at allows you to schedule tasks from command line with simple timing syntax. Grive is a console-based Google Drive syncing tool) -- note, however, that grive may not be present in all repositories.
Setup Grive.
Add this script to the grive directory and name it externalIP.sh:
IP=wget -q -O - checkip.dyndns.org|sed -e ’s/.Current IP Address: //' -e ’s/<.$//'
HOST=host $IP | cut -d ' ' -f5
echo $IP $HOST | tee externalIP.txt
grive
echo ‘cd {path-to-your-grive-folder};./externalIP.sh’ | at now + 2 hours
Make the script executable
chmod +x externalIP.sh
Run the script ONCE
$ ./externalIP.sh
XX.X.XXX.XXX your-hostname.
Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files
sync "./externalIP.txt" doesn't exist in server, uploading
Finished!
warning: commands will be executed using /bin/sh
job 278 at Tue May 6 22:48:00 2014
What the script does is determine the external IP address of your machine, do a reverse lookup on it, write the results to a text file, then sync it with Google Drive. What you can do is read the text file (externalIP.txt) off your Google Drive storage via the web interface at http://drive.google.com, and you can then access it remotely, using either the IP or the hostname. The last line schedules the script to be run again in two hours from now (in case your IP address changes), this is the “job 278” line.
It should also be noted that the scheduling carries on between reboots.
We’re probably all guilty of staring at our devices too much. I’m just as guilty. But this is an interesting watch. No slating, no demonising, just a plea to take a break from social networking for a bit.
China is mourning the loss of two young firefighters who fell hand-in-hand to their deaths while battling a 13th floor apartment blaze in Shanghai.
A member of the public captured the tragic moment the pair were swept away from a balcony as they tried to extinguish the fire, the Daily Mail reports.
Liu Jie, 20, was pushed towards the balcony by a sudden explosion before his colleague Qian Lingyun, 23, tried to grab his hand and save his life.
However, the weight was too much for him to hold, and the pair were pulled from the apartment and fell to the pavement below.
Fire brigade spokesman Jian Ku said: ‘Firemen always watch each other’s backs, they look after each other, this tragic death shows the strength of that bond between colleagues.
‘Guarding one another in life, inseparable in death.’
[caption id="" align=“alignright” width=“350”] parkrun logo (Photo credit: Wikipedia)[/caption]
My first attempt at a Parkrun. Official results: #63 overall, #47 male, #8 in age-range 35-39. Total participants: 102. Official time of 26:15.
You finished in 63rd place and were the 47th male out of a field of 102 parkrunners and you came 8th in your age category VM35-39. Take a look at this week's full set of results on our website. Well done on your first run. We have set this as your PB.
It was in familiar surroundings - Oak Hill Park is my local park and I’ve spent many hours running through it. It may not be as big as some other local parks (e.g. Trent Park) and does suffer from clouds of flies in the evenings, but in the early mornings, pounding the paths is great fun.
My phone’s GPS fritzed again, so my Endomondo and ZR tracks were messed up. Lucky I had my SportsWatch. And the run, with the semi-competitive environment meant I destroyed my 5K PB, and managed to just get a sub-8min mile
An interesting look at 15 different sorting algorithms with a visual representation of how well they run. Everything from the classic Bubble Sort, Heap Sort and Quick Sort. Including a few I didn’t even know about. Radix, Cocktail Shaker, Gnome.
Bitonic is a really weird sort method. And Bogo, well, I have no clue what that one is trying to do.
The Virgin Money London Marathon was disappointed to hear the news that Liliya Shobukhova has been handed a two year doping ban by the Russian Athletics Federation (VFLA).
It notes that the VFLA has annulled Shobukhova‘s results from 9TH October 2009, which includes her results in the London Marathons 2010 – 2011. If this decision is confirmed after any appeal, then it would mean that results from the years she ran in the London Marathon 2010 (1st) and 2011(2nd) or would be annulled.
Hugh Brasher, Race Director of the Virgin Money London Marathon said, “London Marathon is at the forefront of the fight against doping in our sport, and we are very proud to have been the first major marathon to introduce blood testing for all of our elite competitors, prior to each event. This mandatory blood testing commenced at the London Marathon in 2002, and has continued with all our elite competitors throughout. As one of the world’s leading marathons, we continue to work very closely with UK Anti-Doping, the IAAF and WADA with the aim of eradicating drug taking in our sport.”
As part of London Marathon elite athlete contracts, any athlete found guilty of a doping offence will be required to repay any prize or appearance money.
The athlete has a right to appeal the Federation decision. London Marathon is unable to comment further until that has either expired, or any appeal has been determined.
Frozen has got to be the most parodied Disney film in history. And it was only a matter of time before Vocaloidists jumped on board, with impressive success. Here’s Miku singing “Let It Go” (Japanese Version). I believe this is the Demi Lovato/End Credits version.
First run after a long break with diminished lung capacity. Finally felt good enough to give a 5K a try. Whilst I was at it, I tried changing my running posture.
And busted my 1K PB by 12 seconds. I guess this proves (if proof was needed) that your posture helps your running.
THE UK GOVERNMENT has bought a lifeline for Windows XP ahead of the software's 8 April cut-off date, handing Microsoft £5.5m to continue supporting the operating system for an additional year.
The government's £5.48m will ensure that Microsoft continues to provide critical and important security updates for Windows XP, Microsoft Office 2003 and Exchange 2003, and comes just five days ahead of the operating system's End of Life.
Heartbleed certainly shook up a lot of companies, and whilst a lot of companies did their best to get system updated, doing so has caused users side effects, including me.
I use an extension for Chrome/Chromium called HTTPS Everywhere and this forces HTTPS connections to the site you’re visiting. However, since the patching of Heartbleed, some sites have started misbehaving and only work “properly” if I use either the Incognito mode (which means no extensions), or if I deactivate HTTPS Everywhere for the site in question. The side effect of this, unfortunately, means my net traffic to the site in question is exposed via non-secure HTTP. Fortunately, I have encountered only two sites so far which have this problem, neither of them I am too concerned (at the moment) about:
If you are like me and regularly copy music files to your device, you’ll know that some applications only work with playlists, especially fitness apps like Zombies, Run! and miCoach. But these apps use the media storage playlists, so you need to create the playlists in a certain way. I’ve generate a script below. It searches for any files ending in flac or mp3 (common audio formats), and then generates them into an m3u playlist. It prefixes the output with /sdcard/Music (which is commonly where music files go), but this can be changed.
Copy your music to /sdcard/Music/
Copy the script to the same folder.
Change directory into the folder.
Run this script using the line:
playlistmaker.sh .
And you will get a file ALL.m3u
if [ -f “$1.m3u” ]; then
echo Removing $1.m3u
rm “$1.m3u”
fi
OUTPLS="$1.m3u"
if [[ “$1” = “.” ]]; then
OUTPLS=ALL.m3u
fi
echo Building “$OUTPLS”
find “$1” | grep -E “.flac$|.mp3$” | sort | sed -r “s/^(./)//sdcard/Music//” >"$OUTPLS"
SONGS=wc -l “$OUTPLS” | awk ‘{print $1}'
if [[ $SONGS -eq 0 ]]; then
echo “$OUTPLS: ($SONGS songs), not keeping playlist”
rm “$OUTPLS”
else
echo “$OUTPLS: ($SONGS songs)”
fi
This script can also be tied together with a tree walker like so:
find -maxdepth 1 -type d -exec ./findMusicFiles.sh {} ;
The script at the start of this post will generate one playlist - ALL.m3u containing all the media in the current directory and below.
Using the second line of code will walk the directories in the current folder and generate one playlist per directory.