January 2012
2 posts
The Development of the C Language →
Talks about the insights that went into the development of the C language, and its evolution.
ByteBuffer
I was looking at cowtowncoder’s low-gc-membuffers, which led me to look at an introduction to Byte Buffers and the corresponding javadoc.
In short, ByteBuffer is part of the Java NIO and basically allows you to play with memory outside the garbage-collected Java heap.
An interesting/unintended take away from the intro-to-byte-buffers article is the interlude on virtual memory. Gregory...
December 2011
2 posts
chkconfig
sudo apt-get install chkconfig
$ sudo chkconfig —list
$ sudo chkconfig pure-ftpd off
Note: just found out that on Ubuntu 10, Upstart has replaced System V init. Basically, old: /etc/init.d/ and new: /etc/init/
javac
javac SomeFile.java -classpath SomePackage.jar
November 2011
1 post
The Power of Abstraction →
Katayanagi Prize Speech by Barbara Liskov
October 2011
1 post
Yet earlier this year, when Google interviewed its employees about what they...
– http://gigaom.com/collaboration/5-ways-to-keep-your-rockstar-employees-happy/
September 2011
6 posts
Weak human + machine + better process was superior to a strong computer alone...
– Garry Kasparov (I got to know about this from a Palantir Tech Talk)
Protip: Disable "System Program Problem Detected"
This is on Ubuntu 11.10 beta-1
$ sudo sed -i ‘s/enabled=1/enabled=0/g’ /etc/default/apport
make clean vs distclean →
Otherwise, if make built it, then clean should delete it. If configure built it, then distclean should delete it.
x86oddities →
and reverse engineering experiments and documentations…
Heilmeier's Catechism →
Protip: dsh →
Distributed shell.
Add your servers to ~/.dsh/group/myserver
$ dsh -M -c -g myservers ‘uptime’ | sort
(more…)
August 2011
10 posts
{less} →
The dynamic stylesheet language.
Protip: Run detached shell command
$ nohup somecommand &
Varnish →
Makes your website fly.
Spock is not impressed →
Spock is not impressed with this tumblr blog.
hg init →
possibly the best hg tutorial
The pilgrims
I was 24 the first time I went to the Valley. As I walked through...
– http://blog.teambox.com/raised-by-the-valley
/bin/sh -c
The -c option is useful for passing in strings.
E.g. $ /bin/sh -c “ls -al”
history -c
Apparently, you can’t use history -c in a shell script.
ping6 →
How to ping an IPv6 address:
$ ping6 -c 1 -I eth0 fe80::21b:63ff:feab:e6a6
Github Pages →
Allows you to do stuff like this (which currently uses pandoc)
Programming Ruby →
node.js for beginners →
July 2011
19 posts
Protip: Zeroing for VM Compression
I was looking at the postinstall.sh script in vagrant guest machine, and I noticed this neat trick:
# Zero free space to aid VM compression dd if=/dev/zero of=/EMPTY bs=1M rm -f /EMPTY
Protip: Vim Scrolling
Scroll Up: ctrl-y Scroll Down: ctrl-e
Page Up: ctrl-b Page Down: ctrl-f
Jump to Middle of Screen: M
(13) Permission Denied
I was trying to run wsgi and I encountered a “Forbidden” error, so I took tailed the apache logs. I then spent a few hours trying to solve the (13) Permission Denied error.
There wasn’t a namei tool on Snow Leopard, and so I went on #httpd and I was pointed to this awesome script which helped me debug the problem.
$ chmod +x ~/Documents
solve the problem. =)
(I was running my...
Apache on Mac "Stuff"
conf: /private/etc/apache/httpd.conf modules: /usr/libexec/apache2/mod_*.so logs: /var/log/apache2/(access_log|error_log)
Protip: shutdown
Can’t find the logout button?
$ sudo shutdown -h now
.gitmodules →
Example usage:
$ git submodule add git://github.com/altercation/vim-colors-solarized.git ~/.vim/bundle/solarized
Protip: tee (unix) →
Stuff on the Mac front
iTerm2
PeepOpen: editor-independent fast file switcher
None of Us Knows What We’re Doing →
Bonus: Instant.fm tech stack
JS in 10 Days (Brendan Eich) →
Blind Alley Graffiti.: The Will To Fight →
jianxioy:
Dear Japan,
128 days ago, the world watched in horror as your beautiful nation was devastated by a 9.0 magnitude earthquake. You are still suffering from the effects of that disaster 128 days later. But amidst the tears and pain, you fought. You are still fighting this battle and I…
1U →
Learnt a new unit of measurement today.
FreeBSD Dev Handbook →
Chapter 3 on Secure Programming is interesting.
I was looking for this, and the following quote:
Use strncpy and snprintf() when the length is known (or implement some other form of bounds-checking when the length is unknown). In fact, never ever use gets() or sprintf(), period. If you do - we will send evil dwarfs after you.
C++0x →
Microsoft’s Odd Couple →
Excerpt from “Idea Man”, a memoir by Paul Allen.
June 2011
6 posts
Protip: use `cd -’ on terminal to go to previous directory.
Cool UI Trick on webfwd.org →
Observe how the page scrolls down and changes color when the user clicks on “Keep reading”.
A rare and remarkable interview with Bill Gates →
An insightful interview. One of the most candid I have ever seen.
iTerm / Terminal.app
Apparently, switching from Consolas back to Monaco really improved the rendering performance.
http://stackoverflow.com/questions/903816/which-default-setting-does-make-vim-very-slow-in-macs-screen/4755171#4755171
Markup
Markdown
Textile
reStructuredText
Anatomy of a PDF Hack →
May 2011
5 posts
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is...
– The Zen of Python, by Tim Peters
Free speech (and free computing) rights exist only for those determined to...
– David S. Touretzky, CS Prof, CMU