Monday, March 28, 2016

Installing Lua on CentOS

Source

mkdir lua
yum install gcc gcc-c++ kernel-devel
yum install readline-devel
tar zxvf lua-5.1.4.tar.gz
cd lua-5.1.4
make linux

Tuesday, March 8, 2016

interview questions

RSS Feed reader designer
machine coding pubsub
leaderboard design game click

Saturday, March 5, 2016

interview questions

LRU
all elements < k =k >k
cron scheduler design

telephonic
job submitter sync/async

mobile next word suggestion
xml parser system design
deleteMin,deleteMax,findMin,findMax,insert,delete - optimize for them - BST + heap

LRU -> doubly linked list + hashmap
count of numbers with consecutive zeroes.
binary search(number repeated, find the least index)

Tuesday, March 1, 2016

nginx notes

http://aosabook.org/en/nginx.html

  1. When the first version of nginx was released, it was meant to be deployed alongside Apache such that static content like HTML, CSS, JavaScript and images were handled by nginx to offload concurrency and latency processing from Apache-based application servers.
  2. While nginx works in a Windows environment, the Windows version of nginx is more like a proof-of-concept rather than a fully functional port. 
  3. nginx doesn't support dynamically loaded modules; i.e., modules are compiled along with the core at build stage.
  4. nginx conserves CPU cycles as well because there's no ongoing create-destroy pattern for processes or threads.
  5. nginx does not currently support Apache-style distributed configurations (i.e., .htaccess files). All of the configuration relevant to nginx web server behavior should reside in a centralized set of configuration files.

Blog Archive