2012/05/30

Nginx - core utility - 3



ng's core utilities lie in the folder: src/core. Most of them are elegantly coded.

ngx_array_t :

Allocate space from specific memory pool, double the space if full. when need to destroy, shrink memory space to zero.

ngx_buf_t :

One of the beautiful pieces. It supports chain of bufs, that is implemented as allocating one big cake first, and splice equally for each one scheme. When applying for a buf, return the current buf of the chain, or pcalloc one. And update chain operation is to move all elements in busy and out chains to head of free chain.

ngx_conf_t :
to be continued ...

2012/05/29

Excellent Aphorisms

1. Give me your absolutely best, you hear me, your ABSOLUTELY BEST.
2. Never, never, never, never give up.
3. Good leaders are able to take people where they want to be, and outstanding leaders are capable of leading them to the place where they should be but never thought of.
4. Shallow men believe in luck, strong men believe in cause and effect.

2012/05/28

Our Wedding

2012.6.5 We talked about the wedding photo, and decided to take one on 6.6. I planned a great proposal for us. It is NOT going to happen at where or on which piece of ground you might expect. I REALLY hope that was romantic &  surprised. Cross fingers for us.

2012.6.4 My baby complained about when I was about to proposal.

2012.5.29 We made an online appointment for our marriage certificate.

2012.5.28 We agreed on the date(Jun. 12) of applying for marriage certificate.

Delicious food

2012.5.26 We went to Rasasayang at Sea World and tried the Thai food, because we watch the documentary film - A Bite of China, which presented by CCTV -1. This show is awesome, and totally increase our appetite.


2012/05/25

Gdb Cheat Sheet



1 Set gdb to follow fork() or not

set follow-fork-mode parent|child

2 If want to debug both parent and child process (default is on)

set detach-on-fork off

3 Switch between parent and child process
info inferiors
inferior #inferior_number

2012/05/24

Sanya Travel 2012

2012 travel destination is Sanya, Hainan.
Travel schedules on Jun 15, 2012.

2012 Tencent Hackathon

Hey guys, I signed up the Tencent Hackathon which scheduled on Jun. 9 - 10, 2012. Note that the whole process lasts 33 hrs, and take snaps if necessary. It seems pretty fun. The better news is that I got a team of four excellent colleagues. We got a great idea, and feel like we are going to be very high in the future event.

Lately, I read lots of hackathon news from TechCrunch, NYC, YCombinator etc. I love hackathon and deadly want to be part of it. H5ere it comes.

Today we discussed the poster design, idea presentation, and even the domain name register. The domain part is my favourite one.

We discussed the UI design and user interactions details, and also revised the recommend algorithms. It's time to take off. Hang on ……

This morning I did some stupid thing: write a shell script with 'rm *' in it. Then I learned some geek trick to alias the real command.

The day came. Come on, guys, rock and roll, it's party time for geeks. The most important thing is have fun as much as you can.

Live from Tencent Hackathon: our idea comes top ranking.  After 48 hours fighting, our team won the best ** award.

To be continued ...