Alternatives for Google Reader

Google has announced that their Reader service is going to be discontinued. Given that Reader has been my feed reader of choice for some time now, this is pretty annoying that it’s just going to disappear, but luckily there are plenty of alternatives, including apps for Android too.

Android Authority have a good list of apps – I’ve just started using Feedly and so far so good, although not sure if it has an offline mode yet.

Whenever something online gets closed down, assuming it’s widely used, the existing users scurry around looking for an alternative to fill it’s place. So far it looks like Feedly has been doing well, already increasing it’s user base by 3M new users.

Posted in Kev's Blog | Tagged , , , | Leave a comment

Mac OS X Tip: Scroll to top/bottom of page

Useful for long web pages: Cmd + Up/Down (from here)

Posted in Kev's Blog | Tagged , | Leave a comment

Rebuilding a software controlled RAID on Ubuntu

One of my RAID arrays on my server decided that one of the drives was bad and dropped it out of my array. I have two software defined RAID 1 mirrored arrays, /dev/md0 which contains my main drives, and then a smaller array, /dev/md1

This is what mdadm was showing for when one of the drives was dropped out:

kevin@linuxsvr:~$ sudo mdadm --detail /dev/md1
/dev/md1:
 Version : 0.90
 Creation Time : Sat May 16 18:38:51 2009
 Raid Level : raid1
 Array Size : 1485888 (1451.31 MiB 1521.55 MB)
 Used Dev Size : 1485888 (1451.31 MiB 1521.55 MB)
 Raid Devices : 2
 Total Devices : 1
Preferred Minor : 1
 Persistence : Superblock is persistent

Update Time : Tue Mar 5 14:10:24 2013
 State : clean, degraded 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
 Spare Devices : 0
UUID : 44b55b61:84e84f5f:5c7760e0:2ac997c6
 Events : 0.90560
Number Major Minor RaidDevice State
 0 8 21 0 active sync /dev/sdb5
 1 0 0 1 removed

I couldn’t find any messages in syslog for what was wrong with my drive, and the SMART status for both drives was still good. I did have to power off the server to move it without a clean shutdown, so this was probably self-inflicted…

On one of my arrays, adding back the missing drive caused it to add as a spare, it re-sync’d and then everything was back to normal. On the other, it wouldn’t add back:

kevin@linuxsvr:~$ sudo mdadm --add /dev/md1 /dev/sdc5
mdadm: /dev/sdc5 reports being an active member for /dev/md1, but a --re-add fails.
mdadm: not performing --add as that would convert /dev/sdc5 in to a spare.
mdadm: To make this a spare, use "mdadm --zero-superblock /dev/sdc5" first.

I found a few posts describing to fail the drive, remove and then add it back, but this still gave the same error:

sudo mdadm --manage /dev/md1 --fail /dev/sdc5
sudo mdadm --manage /dev/md1 --remove /dev/sdc5
sudo mdadm --manage /dev/md1 --add /dev/sdc5

I don’t know exactly what the recommendation in the error message did, but using the –zero-superblock option and then adding back the drive again did the job. It resync’d successfully and everything’s back to normal.

This post on StackExchange has some good info and suggestions. This one too.

Posted in Kev's Blog | Tagged , , | Leave a comment

webOS gets another chance with LG

After HP bought Palm and promised to ‘double down’ on webOS usage across HP products from printers to PCs, it really went no-where after it’s too expensive TouchPad failed to sell.

LG announced this morning that it is buying all webOS assets from HP, with plans to use the OS in it’s new TVs. Interesting move, and looks like webOS may have another chance yet.

Posted in Kev's Blog | Tagged , , , , , | Leave a comment

Overlapping hobbies: computer technology and Ham radio – Ham Radio Now’s interview with TWiT

I probably have far too many hobbies :-) I’ve always been interested in radio communications, and I’ve decided recently I’m going to take the plunge and get my Technician ham radio license. I was just watching a past episode of Ham Radio Now where they went and toured Leo Laporte’s TWiT studios in Petaluma, and wow, holy cow, I had no idea how much was actually involved behind the scenes at the TWiT studios, my jaw was on the floor.

This is a fantastic behind the scenes look at what’s involved in producing the TWiT shows, well worth a watch (check out part 2) if you’re familiar with Leo’s shows or are just interested in what’s involved to produce an online video podcast based show: http://arvideonews.com/hrn/HRN_Episode_0032.html

Posted in Kev's Blog | Tagged , | Leave a comment

Start-up key combinations for Intel Macs

I knew a few of these but what I was looking for was the C key on boot to boot from an external drive:

http://support.apple.com/kb/ht1533

Posted in Tech Notes | Tagged , | Leave a comment

Committing file deletes to Git

My normal git usage pattern is:

git add .
git commit -m "commit message"

and then when needed:

git push remotename master

The trouble with ‘git add .’ is that is doesn’t stage any deleted files for committing. You can see this if you do a ‘git status’ and you’ll see it list deleted files, but listed as not staged:

$git status
# On branch master
# Changes not staged for commit:
#  (use "git add/rm <file>" to update what will be committed)
# deleted: ...

You’ll notice the comment mentions to use ‘git rm’ to delete files from the repo, but if you’ve deleted files locally, you can either do a ‘git rm filename’ for each of the locally deleted files, or more simply, do this to pick up all changed files for staging, including deletes:

git add -A

Posted in Tech Notes | Tagged , | Leave a comment

Configuring Ubuntu to access a wireless HP printer

hplip is an opensource project to support multiple HP printers on Linux. On Ubuntu 12.04 I already had this installed, but running ‘sudo hp-setup’ gave me this error:

kev@ubuntu:~$ sudo hp-setup

HP Linux Imaging and Printing System (ver. 3.12.2)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

warning: Qt/PyQt 4 initialization failed.
error: hp-setup requires GUI support (try running with --qt3). Also, try using interactive (-i) mode.

A quick Google turned up this post, and installing hplip-gui installed the missing libraries and got me up and running.

sudo apt-get install hplip-gui

Starting up hp-setup again and following the wizard to point to the IP of my printer was all I needed to get my printer working.

Posted in Tech Notes | Tagged , , | Leave a comment

Spring Roo @RooEntity from 1.1.x replaced in 1.2.x

If you have an older Spring Roo project created from Spring Roo 1.1.x and you’re trying to imported it to a more recent STS version and/or trying to upgrade to a later 1.2.x version of Spring Roo, you may be seeing these errors:

RooEntity cannot be resolved to a type

@RooEntity was replaced in Spring Roo 1.2.x with @RooJpaActiveRecord. Replace this in all your Entity classes and you should be good to go.

This is discussed in this thread.

@RooJpaActiveRecord is covered in the docs here.

Posted in Tech Notes | Tagged , , | Leave a comment

‘Security by obscurity’ is not an effective security approach

This is a true story. I just came across a website, which I will not name (yes, I have emailed them to let them know of their issue), that provides a number of tutorials for download for a fee. They also have some free samples that you can download for free that are excerpts from the main materials.

I found the website from a Google search, and one of the search results was a pdf from their site on the topic I was looking for. Once I started browsing the tutorial contents however, I noticed that the file I’d found from my Google search appeared to cover far more pages in one chapter than should have been covered by one of the listed sample downloads, it was a complete chapter.

Thinking this was odd, I noticed that each sample download pdf listed in the tutorial table of contents had a range of pages in the file name, for example chapter1_1-2.pdf, but the file I had come across was chapter2_10-20.pdf

Out of curiosity it didn’t take too much guess work to change my url to point to chapter1_1-9.pdf and I’d downloaded a whole another chapter of material that should have only been accessible as paid materials. Looking at the other file names for the other chapter samples, it was easy to guess all the other filenames for all the other chapters too.

This wasn’t an isolated case. This particular website has a number of tutorials online following the same pattern. Given the example filenames from the free samples, it’s possible to guess all the full download files for all of their tutorials.

What the website owners and/or developers of their site had done was rely on ‘security through obscurity’ – the direct links to the paid materials were not listed on the website, but there was no security to prevent anyone from downloading the paid materials for free, even if they hadn’t paid to access the paid content. They had in effect hidden the paid materials in plain view.

The second mistake was to use an obvious pattern in the file names so that it was easy to guess the file names for the paid content. The table of contents which included links to a small number of sample pages made this easier, because it illustrated that the chapter files were numbered sequentially, and since there was a sample download for the first couple of pages for each chapter, it was easy to deduce that the files names were for all the other pages for the paid content.

If there was another authentication mechanism in place for paying customers to logon on to the site first before they could download content then the sequential nature of the file names wouldn’t be as much of an issue. The fact that there was no other security on the site however, meant that the table of contents with it’s sample links pretty much gave away the names of all the paid content.

‘Security by Obscurity’ is a very ineffective security mechanism. You can assume that ‘no-one will be able to find these files, right?’ but that’s a pretty bad assumption. If you think there’s a chance that no-one will find the files, it also means there’s a chance that someone will find the files. If your business is to make money from selling access to these paid materials, then this is a risk you cannot afford to take.

Posted in Kev's Blog | Tagged | Leave a comment