Slow wake up time on osx

My macbook pro has been slow on waking up. I noticed because it sometimes “hibernated” (borrowed from window). After a little googling I found out that the time-to-hibernate time on my system was only 70 mins. So if I close my lid for longer than 70 mins, the deep sleep will occur. To verify, issue the following command on a terminal. pmset -g You will see something like the following ...

January 31, 2013 · 1 min · birdchan

Need a quick text editor?

Just learned this trick from here. If you want to quickly get a text editor on any system, just type data:text/html, in your browser’s url bar. Click the following link to get a bare text editor in your browser, and start typing! ;) Open a text editor document.getElementById(‘my_text_editor_link’).href = ‘data:text/html, ‘; It’s pretty much like a rich-text editor, with the usual copy&paste. And in the end, you can even save the file as an html file. ...

January 30, 2013 · 1 min · birdchan

Comcast down?

This happened to me last night. All of a sudden I lost internet connection. After checking everything possible on my laptop, I moved onto checking up on my router. And after checking everything on my dd-wrt, I ran out of things to check. Then I realized maybe comcast was down. I then quickly grabbed my phone (thanks to 4G) and checked, sure enough it was comcast. Here is the page to check for your comcast status. You will need to login using your comcast user/pass. ...

January 30, 2013 · 1 min · birdchan

iPhone 5 vs Galaxy S3

Now that I have used both, my feeling is mixed. I recommend to watch these two videos so you will have a good idea what are the major differences between the iphone5 and the S3. It’s true that some of those reasons illustrated in the videos may not concern you, but I bet you will find a few features that are directly related to how you use your smart phone. Have an open mind and enjoy the show! ;) ...

January 30, 2013 · 1 min · birdchan

Transfering your contacts from iphone to android

I found this method with my osx and gmail. Keep reading if this applies to you. 1. Sync all your contacts from your iphone to osx’s Contact. You can do so by using iTunes or iCloud. 2. Export your contacts to vCards. Open up your Contacts application on osx, then scroll and make sure you got all your contacts. Then do a select-all, then file->export->export vCard. This vCard file will contain all your contacts. 3. Import to your gmail. Now log into your gmail account. Then click on the Gmail dropdown on the top left hand corner to get to Contacts. Then click on “More”, then “import”. Then you should have all your contacts there after importing. 4. Clean up. Now you may end up with lots of duplicates. Now click on “More”, then “find and merge duplicates”. This will help you merge most of the duplicates. 5. Now, go to your android phone and sync with your google account. You will then see your contact list there. ...

January 28, 2013 · 1 min · birdchan

Colin Stokes: How movies teach manhood

[youtube &w=640&h=360] It’s interesting to see different kinds of ideas we are subconsciously picking up from movies we watch.

January 24, 2013 · 1 min · birdchan

Trigger a click event on a legend item in Highchart

Sometimes you have a few series in your chart and you want to turn off some of them, maybe because they are too big thus skewing the rest of the data. See below for example, the green bar is just too long compared to the other two. We know that mouse-clicking on a legend item can turn series on and off. Here after clicking on the green legend item, we see: ...

January 24, 2013 · 1 min · birdchan

How one man escaped from a North Korean prison camp

Escape from Camp 14: One Man’s Remarkable Odyssey from North Korea to Freedom in the West by Blaine Harden There was torture, starvation, betrayals and executions, but to Shin In Geun, Camp 14 – a prison for the political enemies of North Korea – was home. Then one day came the chance to flee… His first memory is an execution. He walked with his mother to a wheat field, where guards had rounded up several thousand prisoners. The boy crawled between legs to the front row, where he saw guards tying a man to a wooden pole. ...

January 21, 2013 · 25 min · birdchan

Postgres sequence

Postgres’ sequence is similar to MySQL’s auto increment IDs. Once in a while, you may get this error: duplicate key value violates unique constraint “your_primary_key” Basically, that means postgres is trying to insert a new record to a table, but fails because there is already a row having the same new ID. But how can that be? You may ask. Chances are that your insert statement doesn’t even have the auto-increment ID! ...

January 18, 2013 · 1 min · birdchan

有時候您贏了,但其實您輸了

可不是嗎?有時候您贏了面子,但其實您輸了感情;有時候您贏了口舌,但其實您輸了形象;有時候您贏了好處,但其實您輸了友誼,總之,有時候您看似贏了,實際上您卻輸了! 待人處事固然應該「據理」,但卻不一定要臉紅脖子粗地在那兒「力爭」! 理直氣「和」的態度絕對比理直氣「壯」更易為人所接受。 這世界上有四種人: 第一種人:沒有立場,不講道理,態度也不好。 第二種人:沒有立場,不講道理,態度卻很好。 第三種人:有自己的原則,也很會講理,但表達方式卻很「衝」。 第四種人:很有立場,很講道理,溝通方式也很溫和。 如果將這四種人各配上一個形容詞,我們可以說: 第一種人,是徹底的「可憐人」,因為他將一無所有。 第二種人,是鄉愿型的「濫好人」,因為他實在缺乏立場。 第三種人,是橫衝直撞的「機器人」,因為他雖然邏輯無礙,卻不懂與人相處的藝術。 第四種,是「最可愛的人」,因為他們就是像天使一般。 在這個世界上,唯有成為「第四種人」,您才會是一個真正的贏家! 在人際互動間,您會顧此失彼嗎? 您常「看似贏了,但卻輸了」嗎? 實在值得您深思咀嚼之。 做人不講理,是一種缺點,做人硬講理,是一個盲點。

January 12, 2013 · 1 min · birdchan