Sunday, January 31, 2016

DIY Replace Water Taps

3.5 hours of hard work.
Blood and sweat.
And this is what we have.....

A new water tap for our master bathroom
A new water tap for our guess toilet
And a twin head water tap for our kitchen

Not to shabby eh....

:)

Friday, January 29, 2016

RIP Kaliko

Received a call from Ming yesterday morning. Told me that she found her cat kaliko at the garden of her apartment. Apparently she mist have slipped off the window and fell of from her apartment.

Really came as a shock to us.

Hope kaliko will have a better life in her next reincarnation .

Ocean 3rd steroid jab

Ocean went for his 3rd steroid jab yesterday as he was in pain.

He started showing signs of pain in his mouth about 2 weeks ago. It wasn't until it 2 days back when it gets pretty bad. We decided to bring him to get the jab as we will be back to johor for cny for a few days.

The last jab was 3 months back. Hopefully this time the jab will keep the gingivitis under control longer.

Saturday, December 26, 2015

set symbols

I was about to pick up an algorithm book to read ... "Computational Geometry", and found out that there is some gap that I am missing.......

I don't understand the symbols of the formula in the book.

After some search thru the Internet, got to know that those are actually called the "symbol set".
and here is a very good site that explains it




Here is the cheat sheet from one of the above pdf file:-



Friday, November 27, 2015

Debugging Flow For A Process

I've been stucked with a job which took a lot longer than what it is suppose to take to complete. A friend of mine shared his gems of tricks on how he troubleshoot it, and with a little bit of tweak to my taste, I've came up with a flow(well, almost all of it still from him :p) which I'm logging it here so that I won't forget it.


#1 Find the offending process id (_pid_)

ps -aux | grep job_name


#2 Look at the entire hierarchy of the pid and look at where it stops

pstree -pulna _pid_


#3 Look at the trace of the running program.

strace -t -s 22222 -p _pid_


#4 Look at the read/write IO activities 

cat /proc/_pid_/io







Useful Links

http://www.linux-tutorial.info/modules.php?name=MContent&pageid=84
http://chadfowler.com/blog/2014/01/26/the-magic-of-strace/

Friday, November 20, 2015

Quotes Within Quotes In Linux

I keep forgetting this every time even though I have stumbled across this so many times.
I'm now gonna stick this here so that I can refer it back and hopefully remember this for good.




Basically, the idea is to ....
always just replace each embedded single quote with the sequence: '\'' (that is: quote backslash quote quote) or '"'"' , which closes the string, appends an escaped single quote and reopens the string. 
 https://stackoverflow.com/a/1315213/335181


Putting the above into a perl script works wonder:
#!/usr/bin/perl -pl
s/'/'\\''/g;    ### or s/'/'"'"'/g;
$_ = qq['$_'];



Thursday, November 19, 2015

Ocean 2nd steroid jab this year

Ocean's gingivitis has come back 3 weeks ago.
It had became worsening until the stage that he hasn't been eating for yhe past 3 day.
We decided to bring him in to Hope Vet for another steroid jab. The previous one he had was slightly 2 months ago.

He has been improving a lot ever since. He even asked for food, which is a good sign. But having steroids every 2 months is really not a good thing for thr organs. We hope that could change.

We bought a tube of OROZYME. It is something like a toothpaste. All you need to do is squeeze 1cm out and rub it on him hand, so that he licks it. According to the doctor it acts like an enzyme which kinda breaks down dental plaque and weaken the bacteria.

We r giving this to Hiro and Nala too. Let's see how it works in another month or two.

Display Not Found / No protocol specified

When faced with these errors, it most probably means your X11 forwarding authorization is not set up (or messed up). You will need to manual...