websocketd – like inetd, but for WebSockets
Category: Linux
Linux is my primary operating system. I used it on the servers, desktops, laptops, netbooks, and even mobile phones since approximately 1997. I’ve tried a number of distributions over the years, and even created a couple myself. I still look around sometimes to see what others are up to. But most of my machines are running some sort of Red Hat – either a quick and easy Fedora Linux, or a stable and secure Red Hat Enterprise Server, or a cheaper CentOS alternative.
And while by now I am very comfortable in the Linux environment (both graphical and command line), I still discover a lot of new and interesting things about it. When I come across something worthy, I usually share it with the rest of the Open Software world, using this category.
How many lines of code have survived to the current day from the original Linux kernel
Here is a excellent Quora question: how many lines of code, if any, from Linux 1.0 are still in the modern Linux kernel, and what is it? And an evenly excellent answer:
According to git diff, 21228 of the 176250 lines from Linux 1.0 (1994-03-14) are still present in Linux 3.12 (2013-11-03):
$ empty_tree="$(git mktree < /dev/null)" $ git diff --shortstat "$empty_tree" 1.0 561 files changed, 176250 insertions(+) $ git diff --shortstat -M -l99999 1.0 v3.12 44905 files changed, 17702349 insertions(+), 155022 deletions(-)Over half of these lines are blank or consist entirely of punctuation; only 10419 of them have at least one letter or number.
We can go back even farther to the very first public release, Linux 0.01 (1991-09-17). Of the 10239 lines in Linux 0.01, 954 survive in Linux 3.12, of which just 242 have at least one letter or number. 123 of them were structs and constants in include/a.out.h (now include/uapi/linux/a.out.h), and 26 of them were the S_* macros in include/sys/stat.h (now include/uapi/linux/stat.h). The rest were scattered through 24 other files with at most 9 lines each.
It might appear that not much. But it is in fact impressive. How much code have you written that survived for over 20 years in a project that has changed so much – from a hobby experiment to a dominant operating system across servers, mobiles, and embedded devices?
CentOS 6.4 update finally supports IW10 for tcp/ip tuning
rm -rf / horror stories
Someone asked Quora community to share the craziest “rm -rf /” stories. There are quite a few good ones, including this video from Pixar about Toy Story 2 almost not happening.
[youtube=http://www.youtube.com/watch?v=EL_g0tyaIeE]