Sunday, March 22, 2015

Green Slips

Also known as Comprehensive Third Party (CTP) insurance. In NSW, there are currently seven Green Slip insurers. Instead of getting quotes from each of them, Motor Accidents Authority (MAA) provides a green slip calculator that asks you a series of basic questions, and gives a fairly accurate estimate of how much each insurer will charge you. Prices include Medical Care and Injury Services (MCIS) and GST. You can find the calculator here: http://prices.maa.nsw.gov.au/

Thing is, I can't remember who's my current CTP insurer. And I didn't get a renewal notice or email. I was hoping to get a better deal through a renewal of policy.

Turns out Roads & Maritime Services (RMS) offers a free greenslip and registration check service at https://myrta.com/regcheck/ Simply enter the plate/registration number, and you'll get a free report with basic vehicle info, registration and CTP insurance details. Anything more, you'll need to pony up $21 for a vehicle history report.

For everything related to green slips, visit www.greenslips.com.au. Heck, then even have their own calculator.

Thursday, March 12, 2015

For When rm Is Not Good Enough

So one day I find myself with a directory with more that a million files that need to be cleaned out. A simple rm * is not going to work because of the number of files (argument list too long). First thing I tried is:
find <directory> -name "alarm.*" -mtime +360 -exec rm {} \;
This worked, but takes too long because you have find, xntpd, and rm working sequentially. I also noticed that xntpd is just hogging all the CPU.

Then I tried removing mtime, but it still takes too long. If I try some other filename patterns, find just quits - maybe because there are just too many matches.

Instead of using -exec rm, someone suggested using the -delete argument to make it safer, faster, and more efficient:
find <directory> -type f -delete
Unfortunately, my find doesn't support this argument.

Another suggestion is to do a loop via bash:
bash# for i in *; do
> rm -f $i;
> done
While this works, you're still deleting files one at a time, so very slooooow.

Another trick is to create an empty directory, then rsync it with the directory to be nuked:
rsync -a --delete empty_dir/ full_dir/
Again, unfortunately, my locked-down system doesn't even have rsync, and I'm too lazy to copy it in.

The other way of doing it is to remove the directory totally, then recreate it. One downside is that the new directory might not be exactly the same as the one you deleted, so some applications might not work anymore.

What ultimately worked for me is:
ls -f| xargs rm
By disabling sort, you don't have to load the entire directory listing to memory. The unsorted ls simply streams its output. xargs then passes on as many filename as possible to rm for deletion.

Thursday, January 29, 2015

Movie 2015.01.29 - Crazy, Stupid, Love

I have so many movies, my hard disk is starting to fill up. First movie I've decided to purge is Crazy, Stupid, Love. Nothing wrong with it - well-known cast, quirky plot, though nothing outstanding.

Couple of 25 years divorces because the wife slept with a colleague. Depressed husband meets womanizer in a bar, and takes lessons from him to get his mojo back. Meanwhile, his 13-year-old son is in love with the 17-year-old babysitter. The babysitter rejects him because she has a crush on the husband. To get the husband's attention, babysitter takes some nude photos of herself with the intent of giving them to him. Her parents, who are friends of the divorced couple, discovers the photos. Womanizer finally meets the girl of his dreams, and changes his womanizing ways. Girl turns out to be the daughter of the divorced couple. In the end, I believe the couple gets back together.

Plot twist: babysitter gives the nude photos to the lovestruck kid as a special gift to get him through high school.

Sunday, January 25, 2015

Google Opinion Rewards Not Rewarding

For those who haven't heard of Google Opinion Rewards before, it's an app where you answer some quick anonymous surveys, and earn Google Play credits that you can use towards apps, music, movies, games, and books in the Google Play Store. Doesn't work for devices though.

Not sure when Google Opinion Rewards actually launched in Australia, but I believe I was an early adopter. I've been getting on average about 9 surveys per month, and the payout is not too bad, considering the amount of effort in answering the surveys. Lately, I've noticed that the surveys are becoming fewer and fewer. And with the few surveys that I'm getting, the app tells me that it has some trouble submitting my response, and will save the results and try later.

If you've been getting similar messages, this is most probably due to adblockers not allowing submissions to go through to Google's servers. If your custom ROM comes with built-in adblocking, disable it temporarily. I, for one, is using AdAway. After disabling adblocking and rebooting, I had 4 surveys sent through successfully.

If you don't want the hassle of disabling and enabling adblockers and rebooting every time, simply add survey.g.doubleclick.net and clients4.google.com to your whitelist.

Movie 2015.01.25 - Astro Boy

Simple movie with a moral lesson to impart without being too preachy. Didn't know the origins of Astro Boy before this, so it's all new (and interesting) to me.

Astro Boy is actually a boy robot created by Dr. Tenma to replace his son Toby, who passed away during an industrial accident at the Ministry of Science. Astro Boy is gentle, caring, and helpful because he's being powered by a blue core. On the other hand, we have the red core, which is unstable and represents negative energy. It's election year, and President Stone of Metro City has this bright idea of declaring war on the Surface to boost his popularity. Dr. Tenma refuses to give up Astro Boy's blue core, so President Stone uses the red core to power up The Peacekeeper. It somehow absorbs President Stone and seeks to destroy Astro Boy. The two are evenly matched. Metro City is so heavily damaged that it dropped out of the sky and landed on the Surface. To prevent further destruction, Astro Boy flies into the Peacekeeper, and they both explode. President Stone is removed from the Peacekeeper unharmed, and is promptly arrested. Meanwhile, Astro Boy is deactivated, as the blue core has been drained after it bumped with the red core.

There's no chance of having a sad ending as this is a kids' movie. Zog, a robot whom Astro Boy revived before using a dose of blue core, gives back some of the energy, and reactivates him. Yay!

Thursday, January 22, 2015

Cloud Storage Manager

With so many cloud storage providers offering free storage, you're bound to have signed up for a few of them. Question now is, how do you keep track and manage all your files scattered out there? With online cloud storage managers, of course. Basically, you sign up for an account with the service. You register all your cloud storage providers with that service. Then, you can start managing your all your files from the different providers using one single interface.

When it comes to cloud storage managers, these are the more popular ones:
  • Primadesk aims to be the one-stop-shop for all your online services. Aside from cloud storage, it can also manage your social, photo, and email accounts. It also supports cross-service file transfers. The only downside is the lack of OAuth support. This means that you have to provide Primadesk with login information for all registered services. Primadesk is from the guys who created ZoneAlarm. Give that I don't use ZoneAlarm, I've decided not to use this, too.
  • JoliCloud has been around for a while. It first started out as an Ubuntu distribution for netbooks with strong emphasis on cloud integration/services - pretty much like ChromeOS. Their cloud storage manager is called Drive. The UI looks pretty neat and slick. It supports OAuth, . It can handle your social accounts in a unified feed. It supports file previews and built-in MP3 player. Does not support cross-service file transfers. There's only a limited number of services you can register. If you want more, you have to do some social media shares promoting the service.
  • Otixo is pretty much the same as JoliCloud's Drive. Supports OAuth AND cross-service drag-and-drop file transfers. At the moment, it only allows for 5 file transfer at a time between services for the free account.
For now, I'm trying out both JoliCloud Drive and Otixo. In terms of UI and features, I'm leaning more towards Drive.

Tuesday, December 30, 2014

Clash of Clans

Have been playing Clash of Clans for the past few weeks, and I have to admit it's quite addictive. It started when my wife's cousin was teaching my son how to play the game. He didn't get the finer points of the game, so he simply wasted away his resources, and nothing much was happening after that. So I thought I better play and learn the game myself, so I can teach him. Ended up playing more than him.

There are three ways to play Clash of Clans. In single-player campaign, you attack a series of goblin villages, earning gold and elixir as reward. In multiplayer mode, you are paired with another player within your same league. If your attack is successful, you are rewarded with gold, elixir, and trophies. You can also opt to join a clan, and attack other clans. This involves one day for preparation and another day for the actual clash.

Most of my game time is spent on building/upgrading defences, gold mines, elixir collectors, and storages. With the collected loot, you can train troops, upgrade buildings and walls, etc. Once your troops are ready, you can attack other players for trophies and more gold/elixir. When your phone/tablet is idle, other players can also attack your village. So on and so forth.  Build time takes longer and longer as you level up. It also requires more and more resources to upgrade the same structure.

I guess this is where the appeal of the game comes from. There is an end goal to aspire for, and it takes a lot of effort and resources to achieve, but everything is broken down into levels, so you know where you are in the hierarchy. You train up to see if you have what it takes to beat the next guy. You design and plan your village and defences to see if they can stand up to attackers on their own. So far, I haven't joined any clans because I wanted to see how far I can take my village without resorting to outside help. And no actual money spent on IAPs like gems.

Movie 2014.12.30 - Lucy

Movie is about a woman (by the name of Lucy) who overdoses on synthetic CPH4, and activates 100% of her cerebral capacity. Written and directed by Luc Besson, the movie has great visuals and amazing action sequences, but the storyline is a bit weak. Too much scientific mumbo jumbo, and too much time spent trying to explain said mumbo jumbo to the audience. Also, if you have four pouches of super dope CPH4, would you trust them to random people you picked up from the street? Then go all-in with your whole gang to retrieve them? Why not just cut your losses and cook up a new batch in the lab?

So what can you achieve once you go beyond the standard 10% mental capacity? You can feel everything that happens in your body. You can feel your bones growing, your cells splitting, your body heat being emitted, etc. You can remember everything that has happened to you - all the way back to when you were born. You don't feel pain or desire. You can listen to people's conversations, even at a distance in any language. You can control electronic devices like TV, phones, laptops, etc. You can read people's minds. You can change your hair colour and style at will. At 60%, you can drive like a French cabbie. You can physically control people and inanimate objects (think guns and knives). You can create invisible force fields. At 70%, you can travel through time (backwards only), while sitting on a chair. You can manipulate matter and information. You start to lose yourself and morph into a black supercomputer with lots of spikes. At 100%, you become a USB stick. I wonder what storage capacity it has if it's meant to contain ALL known information in the world.

Tuesday, December 23, 2014

Swollen Uvula

Woke up with a bad case of swollen uvula. It's that little thing that hangs off the back of your throat. My one was inflamed and a bit swollen and elongated that it's actually touching my tongue. Every time I have to talk or swallow, it gives me such pain. Too cheap and/or lazy to go to the GP, I consulted the health experts on the interwebs instead. No shortage of that.

They reckon it's a viral/bacterial infection brought about by dehydration. They could be right, as I had some sinus problems some days ago. Lots of websites with different suggestions, but these are what I'm trying out:
  • Gargle regularly with warm salt water to clean out excess mucus. Not saltwater from the sea, but ordinary tap water with added salt.
  • Drink lots of lemon ginger tea with honey.
  • A couple of lozenges (Strepsils) every few hours.
  • Cold drinks and ice cream to numb the pain. This I approve.