The Secret Behind the Auto Proxy Setting

While most people surf the Internet for pleasure, I mostly browse for knowledge. I.e., there will be lots of times that I need to revisit a page again and again. Hence, I configured my squid local http caching server. All machines in my home are using it, so even if I browse back to the page again on a different machine, the page loading will be still lightening fast as they all contribute to the squid caching pool. I’m happy with it.

However, there are times that my friends or colleagues coming to my home. If that happens, mostly likely we will be focusing on the same thing, meaning, we will be browsing the same sites, and same pages. The problem is, despite that the sites/pages have been cached locally, my visitors can’t easily use it, and have to request from outside each on their own. I’m not happy with it, and now decided to deal with it.

This prompted me to look into the mechanism behind all the browser’s automatic proxy settings. Can I setup something similar in my home so that my visitors can enjoy my caching server easily?

Continue reading

Use dbab under Ubuntu 14.04 Trusty

Documenting the steps I use to install/configure dbab under Ubuntu 14.04 Trusty. All in all, nothing unusual as before, as long as you don’t touch the new feature in the /etc/network/interfaces and ignore the /etc/network/interfaces.d directory. I only notice the new feature now (until Ubuntu 14.04), and was curious to give it a try. But it turns out to be a dead-end detour. Details at Setup static IP under Ubuntu 14.04 Trusty.

Now back to the steps I use…

Continue reading

The words reverse problem

I was looking for some interesting data structure problems to reveal if the candidate lacks the systematic thinking on the fundamental programming concepts, but I haven’t found one so far, because the tree related problems are over-exploited, and graph or dynamic programming are mostly too complicated to finish in a short time. My last post could be one, but I have never seen anyone else but me solving it via utilizing proper data structure.

While kept looking for such interesting problems, I came upon another one that is at least simple enough to be finished in a short time. Here is its formal definition.

Continue reading

Data Structures + Algorithms = Programs

Over the course of my programming life, I had come to the conclusion again and again that a good data structure is the key for a good program. So many times, I found that a sub-optimal or total-cumbersome program can be (dramatically) simplified by choosing the correct data structure.

Choosing the correct data structure is the most important part of the programming steps, because your algorithm will go along with your data structure. Yet, this has been overlooked by many people, which is especially true to those who turn to programming half way during their life, who lack the systematic training on the fundamental programming concepts.

What’s interesting is that, I found those people who believe that they are good programmers, and who are not afraid to show off their programming skills on the Internet, some of them still don’t understand the importance of designing a proper data structure in the first place.

Continue reading

Emacs Etc Fstab Mode

Today I decided to take advantage of the new /etc/fstab.d/ directory, so I re-factored my big /etc/fstab file into three separated files under /etc/fstab.d/:

  1. The must-have entries
  2. The needed entries that will be mounted when system boot up, and
  3. The optional entries that will NOT be mounted when system first boot up

However, when I try to edit those split-out files under /etc/fstab.d/, I noticed that the nice Emacs font-locking (keyword colouring) is gone. That’s uncomfortable, and it took me a while to figure out how to get it back.

Continue reading

Dual Boot Windows 8 UEFI with Ubuntu

This is about making it possible to dual boot Windows 8 UEFI with Ubuntu. There are lots of such blogs/posts on the Internet already, so why another one? The reason is mainly two folds:

  • Many of them aren’t clear whether their Windows 8 is booted with UEFI or not.
  • And most importantly, there are also lots of posts/questions that their systems are toasted, after trying.

I kind of like to know all the “dangers” before jumping into the water. So I “looked”, before I leaped. Now I’d like to share out what I’ve “looked” so far, so as to make the next person’s life a bit easier, if s/he wants to dual boot Windows 8 UEFI with Ubuntu as well.

My findings are posted at http://goo.gl/5dR4Ty, or https://docs.google.com/document/d/1L0obnZkzX7aFyWqmx6zS1CrXEH_X9rRJUnBYeWWjJgU/edit#heading=h.hjmzej1mnr0j, if you don’t want to click on shortened urls.

HTH