Vim Adventures

An interesting mini game to learn vim. https://vim-adventures.com/

May 23, 2017 · 1 min · birdchan

How 5 Tech Giants Make Their Billions

ref: http://www.visualcapitalist.com/chart-5-tech-giants-make-billions/

May 23, 2017 · 1 min · birdchan

How to reset iphone/ipad without the icloud password?

The icloud prompt could keep coming up asking for the icloud password. It sucks when you forgot the icloud password, and at the same time forgot the password to your corresponding email. Factory reset (Settings -> General -> Reset) won’t do it, coz after the reboot it will again keep asking you for the icloud password. And there is no way to log out or switch the existing icloud login username. ...

May 20, 2017 · 1 min · birdchan

HTTP security headers

This post has really good info on HTTP security headers. https://blog.appcanary.com/2017/http-security-headers.html X-XSS-Protection Content Security Policy HTTP Strict Transport Security (HSTS) HTTP Public Key Pinning (HPKP) X-Frame-Options X-Content-Type-Options Referrer-Policy Cookie Options

May 19, 2017 · 1 min · birdchan

Why does Python 3 round half to even?

Python 2 [code language=“python”] round(3.5) => 4.0 round(4.5) => 5.0 [/code] Python 3 [code language=“python”] round(3.5) => 4 round(4.5) => 4 [/code] Mainly because: to take away the round-up bias. the result can be further divided by 2, and still an int https://mathematica.stackexchange.com/questions/2116/why-round-to-even-integers https://en.wikipedia.org/wiki/Rounding#Round_half_to_even

May 7, 2017 · 1 min · birdchan

Key differences between Python 2.7.x and Python 3.x

Just a short list, not too bad. The __future__ module The print function Integer division Unicode xrange Raising exceptions Handling exceptions The next() function and .next() method For-loop variables and the global namespace leak Comparing unorderable types Parsing user inputs via input() Returning iterable objects instead of lists Banker’s Rounding http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html

May 7, 2017 · 1 min · birdchan

Für Elise

It’s: foo e-LI-sa https://youtu.be/67OkKjrS7bk [youtube ]

May 7, 2017 · 1 min · birdchan

Elon Musk: The future we're building -- and boring

[youtube ] This is worth a look, the future Elon Musk sees. If you need subtitle, follow this TED link.

May 2, 2017 · 1 min · birdchan

"The eyes of others our prisons; their thoughts our cages." ― Virginia Woolf

true that

April 12, 2017 · 1 min · birdchan

成為霆鋒廚神10大要訣

1. 一般人雙手做的,你單手做(例:剝蕉、劃火柴); 2. 一般人單手做的,你反手做(例:點打火機、唱K揸咪); 3. 一般人用手做的,你用工具做(例:用筷子夾飲筒飲嘢); 4. 一般人用工具做的,你又用返手做(例:用手指插落煲湯再舔手指試味,死唔用匙羹); 5. 一般人會保護自己的,你唔用(例:唔戴頭盔揸電單車); 6. 一般人唔保護自己時,自己又好保護自己(例:戴眼罩炸食物); 7. 一般人做得型的,你死都要諗個更有型嘅方法去做(人哋拋鑊,你叉腰拋鑊); 8. 一般人做得型的,但你諗唔到點樣更有型咁做,你戴黑超; 9. 一般人做得型的,但你諗唔到點樣更有型咁做,又喺室內唔方便戴黑超(室內唔好意思戴黑超其實你已經唔型),你慢動作笑住做; 10. 總之,人哋點做,你一定唔好同人哋一樣,人哋賣旗貼心口,你貼手臂,人哋貼手臂,你貼衫腳… ref: http://www.passiontimes.hk/article/04-01-2017/36974

April 1, 2017 · 1 min · birdchan