Posts Tagged ‘Linux’

Stop almost all YouTube and internet ads in less than 30 minutes using a Squid Proxy Server

October 17, 2015 Leave a comment

no andsI use Adblock or Adblock Plus in all my web browsers so I hardly ever see an ad but when I’m using the web however when I (or the family) use Apple, Android or XBox devices to watch youtube content online or browse the internet I’m constantly reminded how annoying ads actually are.

Someone in my family (not me) was trying to watch Channel 10 catchup TV today day and before they could start watching the show they had to sit through 2 ads and then there were more ads (up to 4-5 ads at a time) throughout the broadcast as well.

That is a rubbish experience & I knew I could make it better.

I’d been putting it off for a long while – mostly due to time constraints – but when I actually focused on enabling ad blocking via my Squid proxy it took less than 30 minutes to block approx 95% of all ads supported by adblock plus including youtube, google, etc and for right now – my family is happy that they can watch Channel 10 catchup TV without any ads & with no other counter measures in place approx 95% of all web based ads (including youtube ads on apple devices etc)  have been blocked on local apple devices using the proxy.

If (like me) you already have a Squid server running – I highly recommend – – just make sure you put their recommendations at the top of your squid.conf file – otherwise it didn’t work for me.  I also had to add a few additional domains to the ad_block.txt file to block some of the local advertising.

The main reason I’m excited about this is that I can apply a single rule to ignore a new ad server and have it apply across all the devices on my local network that didn’t have any adblocking capability previously.

I’m also aware that there are many ways to circumvent this this type of blocking – however – until then – everyone on my lan is enjoying ad free browsing.

I’m thinking about proving a Raspberry Pi turnkey solution as a side project, would you be interested?

Categories: General, Technology Tags: ,

Hard Disk Drive Data Recovery Using A Freezer Actually Works

February 4, 2015 1 comment

Frozen HDDAfter a Linux kernel upgrade, an old data hard drive in one of my Linux boxes (which I very rarely reboot) failed last night so the box  wouldn’t boot without manually skipping the HDD.  Recovering the Linux box simply meant removing the old data drive, swapping it with another drive I had lying around, updating the drive UUID in /etc/fstab and away the server went again.  Plus the server got a 320GB data drive upgrade in the process 🙂

Loosing the HDD data drive wasn’t a really big issue as the drive was automatically backed up about a week ago and it only stores media files and other transient data so it wasn’t a huge loss if I couldn’t recover it however, it would be much easier if I could get the last week of data off the drive.

Plugging the problem drive into an external HDD case and trying to mount it on another machine was no good.  I could hear the drive spinning up and the hdd heads trying to engage with the disk platters but it just wouldn’t start.  Then, I remembered a very old (but fairly well known trick) which is to put the HDD in the Freezer for an hour or so and then retry accessing the drive.  I’d never had the opportunity (or reason) to try this before and I though it was something worth testing so I put the HDD in a sealed zip lock plastic bag and stuck it in the freezer.

After an hour I removed the HDD from the zip lock, plugged it back into the external HDD case and connected it to my PC.  I fired up a System Rescue Linux VM and attempted to attach the HDD.  I could hear the drive spin up and the heads were now engaging with the disk platters, VMWare reported that the drive was attached and available but the Linux VM wouldn’t read the drive (fdisk -l just hung).  After about 5 minutes and a few restarts the drive it was finally recognised by Linux and I was able to copy the data off the drive.

I must admit, I’d heard the rumour that freezing a hard drive would allow it to work for long enough to copy the data off it many times before but now that I’ve actually tested it myself I can confirm that it does actually work.

Final thoughts, even though I had a backup it was still a week old, make sure you backup your data regularly as you never know when a drive might fail and also ensure you backup any important data BEFORE a server restart.

Categories: Technology Tags: , , , ,

Xbox Live Status Script

December 27, 2014 Leave a comment

If you’re like me, frustrated by all the Xbox One DDOS going on over the Christmas Holidays and have a linux box lying around here is a small script to check the service status in Australia.

Just cron it and output it to a log file – after that you can do what ever you want with the output.

I hooked the output up to my Raspberry Pi and changed the color of an LED  from Red to Green based on the Xbox Live Core Services Status.

# Author: Merric Reese
# Date: Dec 26, 2014
# Purpose: Show Xbox Live Status and report when Core Services are online
# Notes: Common sense rules apply to usage - I only run this script about every 5 minutes during a service outage 
MR_PAGE=$(curl -s
MR_XBOX_CORE=$(echo "$MR_PAGE" |grep -Eo "Xbox Live Core Services.*[L|l]imited|Xbox Live Core Services.*[A|a]ctive" |grep -iEo "active|limited")
MR_XBOX_PURCHASES=$(echo "$MR_PAGE" |grep -Eo "Purchase and Content Usage.*[L|l]imited|Purchase and Content Usage.*[A|a]ctive" |grep -iEo "active|limited")
MR_XBOX_GAMING=$(echo "$MR_PAGE" |grep -Eo "Social and Gaming.*[L|l]imited|Social and Gaming.*[A|a]ctive" |grep -iEo "active|limited")
MR_XBOX_WEBSITE=$(echo "$MR_PAGE" |grep -Eo "<h3>Website.*[L|l]imited.*</h3>|<h3>Website.*[A|a]ctive.*</h3>" |grep -iEo "active|limited")
MR_XBOX_TV=$(echo "$MR_PAGE" |grep -Eo "TV, Music and Video.*[L|l]imited|TV, Music and Video.*[A|a]ctive" |grep -iEo "active|limited")
if [ "$MR_XBOX_CORE" != "Limited" ] && [ "$MR_XBOX_GAMING" != "Limited" ]; then
# echo "#"
echo "### FIXED ### " $(date) "Xbox Live Core Services: $MR_XBOX_CORE | Social and Gaming: $MR_XBOX_GAMING | Purchases and Content: $MR_XBOX_PURCHASES | Website: $MR_XBOX_WEBSITE | TV, Music and Video: $MR_XBOX_WEBSITE"
# echo "#"
echo "waiting... " $(date) "Xbox Live Core Services: $MR_XBOX_CORE | Social and Gaming: $MR_XBOX_GAMING | Purchases and Content: $MR_XBOX_PURCHASES | Website: $MR_XBOX_WEBSITE | TV, Music and Video: $MR_XBOX_WEBSITE"

BTW: I haven’t spent the whole time coding or waiting for Xbox Live to come back online.  I’d just like to able to download the free games when the service is available and this was an easier way to check the service status.

If you found this useful then please leave a comment.

Have a very Merry Christmas and a Happy New Year.

Categories: Technology Tags: , , ,

Kubuntu 12.04 LTS on a Dell T1600 with Nvidia Card

July 17, 2012 1 comment

I’ve been trying to install Kubuntu 12.04 LTS on a Dell T1600 for about 45 minutes now.  Each time it boots off the CD it ends up on a blank screen with a cursor flashing in the top left corner of the screen.  The install has obviously hung but there is no feedback. I also burnt a new CD incase it was the issue but still no joy.

So, as always, Google is my friend and I’ve found several other people (even with different distros) having the same problem and it appears to be related to the nvidia card in the system and the open source drivers.  Using the open source nouveau driver will cause the install to hang.  There is also some threads mentioning that it may be a kernel bug.

There are a couple of solutions I’ve seen for this so far.

Use the nomodeset option in the boot options to force the system to use VESA drivers  – more info at – time is of the essence for me so I didn’t try this but it looks like it may work.  You will still need to fix the Nvidia driver after you have completed the install.

My system has an additional Nvidia card so it can be used as a multi display system. As I’m building this system as a headless Splunk server I don’t need multi displays on this system so I just removed the card and used the default (on board) VGA display.

For me, this solved the problem and I was immediately able to boot the X64 live CD and start the install.

I have another box with the same config that I will need to configure multi display.  I have more time to build that box so I will dig a bit deeper into the cause of the issue and hopefully be albe to resolve the issue.  I’ll post what I discover.

As alway comments and questions are welcome.

Categories: General Tags: , , , , ,

Wireless-N Upgrade – Thinking about a Christmas Treat

December 23, 2010 Comments off

Why Not?

Lately I’ve been looking for a bit more bandwidth in my home network to be able to stream HD video over wireless and moving to N seemed like the logical choice.

For the last 3 years I’ve run a Linksys WRT54GL with DD-WRT firmware and it has been solid as a rock – best wireless I’ve ever had and will be a very hard act to follow.

My “new” work laptop supports Wireless-N and I get about 150MB/s at the office (which is faster than my wired lan at home) so I thought it could be a potential solution to my bandwidth problem.

So needing a bit more wireless bandwidth – the search was on for a new DD-WRT compatible wireless solution.

I’m currently considering the ASUS RT-N16 – seeems to have excellent specs – plenty of grunt, 2 USB ports and supports either DD-WRT or Tomato firmware.  From what I’ve read the ASUS firmware is flaky and results in wireless dropouts but those on Whirlpool that have upgraded to either Tomato or DD-WRT are reporting good performance.  In addition the RT-N16 has a fast processor (480MHz stock + ability to overclock), 32 MB Flash (which is huge – even the biggest installs of DD-WRT are only just over 8MB) – to me this seems like a really fast piece of kit capable of running DD-WRT.  The 2 USB ports bring into play usage as a torrent box plus a printer hub.

The ASUS RT-N16 seems to have a hugh amount of potential – I think I’m going to have to get one and see how far I can stretch it.

Anyone else have experience with this model? Other thoughts?

MythTV Ads, WDTV and ProjectX equals no more ads

February 9, 2010 5 comments

Warning to all – this is a very long & somewhat technical post…

You know, I’m really not a programmer any more, I can’t remember the last time I wrote a piece of production code – and in my current role – believe me – that’s probably a good thing – I now leave that to the expert Java developers in my team.  But, I came across my first MythTV recording that was from CH10 (Aus) and like all commercial channels it had ads…Argh!!!

To be honest – I don’t watch that much commercial TV anymore – so to be honest, this is rare, but it was a show that we regularly watch so – it became a priority 🙂

Anyway, from my recent experience, MythTV does a really great job of recording anything you point it at and it’s also very good at finding and flagging most of the TV ads but it’s really not very good at finding the start & end of a show – and trust me if you record anything on CH10 unless you leave 5 mins before the scheduled start of the show and at  least and 15 mins after the scheduled finish – you are going to miss it.  To magnify issues somewhat – we were watching the show upstairs on a non MythTV player – SO THERE WAS NO AUTO AD SKIPPING – and at that point – it was game over – I needed to find something to fix the ad problem or next time… (you know the rest)…

Well, as always in IT, the answer is always more complicated that was originally envisioned… So there are two parts to this simple endeavor Read more…

Categories: Technology Tags: , , , ,

WDTV plus B-Rad Firmware equals Many New Possibilities

January 9, 2010 11 comments

I purchased the original WDTV (Western Digital HD Media Player) over 12 months ago – they are a fantastic little box that will play just about anything and have full 1080p HDMI output with 5.1 digital out – needless to say it has served me very well.

My only negative comment is that it required a lot of sneaker time (copying files from my torrent server onto USB drives and then plugging them into the WDTV player to view them on my HDTV).

Well, Western digital recently released a new version, the WDTV Live – the best new feature is that it includes is ethernet (on board) and wireless support (with selected adaptors).  I’ve upgraded to the WDTV Live and I have to admit – I think it’s worth it.

Not only is the new WDTV Live faster than the original version it also supports DTS decoding and I’ve also found it’s Read more…

Categories: Technology Tags: , ,