ADWiki

ADWiki

Online documentation system for JavaScript projects that adhere to JSDoc API documentation format.  Includes:

  • Tools for parsing JSDoc blocks in the JavaScript files
  • Clean documentation website based on Twitter Bootstrap
  • Simple blog engine integrated with the site, where developers can commend and extend project documentation.

Requires Node.js and MySQL.

Bash directory bookmarks

While reading through the comments to this Habrahabr article (in Russian), I came across an excellent tip for the directory bookmarks in bash shell.  Here’s how to set it up.

Firstly, add the following lines to your .bashrc or .bash_profile file:

# Bash Directory Bookmarks
# From: http://habrahabr.ru/post/151484/#habracut
alias m1='alias g1="cd `pwd`"'
alias m2='alias g2="cd `pwd`"'
alias m3='alias g3="cd `pwd`"'
alias m4='alias g4="cd `pwd`"'
alias m5='alias g5="cd `pwd`"'
alias m6='alias g6="cd `pwd`"'
alias m7='alias g7="cd `pwd`"'
alias m8='alias g8="cd `pwd`"'
alias m9='alias g9="cd `pwd`"'
alias mdump='alias|grep -e "alias g[0-9]"|grep -v "alias m" > ~/.bookmarks'
alias mload='source ~/.bookmarks'
alias ah='(echo;alias | grep "g[0-9]" | grep -v "m[0-9]" | cut -d" " -f "2,3"| sed "s/=/ /" | sed "s/cd //";echo)'

Secondly, if you are already using ~/.bookmarks file for anything, change the two references to it in the above lines to some other file.  It’s where your directory bookmarks will be stored.

Thirdly, if you prefer to save the bookmarks between your bash sessions, add the “mload” command to the end of your .bashrc or .bash_profile file, and “mdump” to your .bash_logout file.

Start a new bash shell and you are all set.

Using this setup is extremely easy.  Navigate to the directory that you want to bookmark, and save it under the numbered bookmark:

$ cd /var/www/html
$ m1

When you want to navigate back to that folder, simply call the numbered bookmarks:

$ g1

If you need to refresh your memory, issue “ah” command (think: aliases help), and it will print out the list of your current numbered bookmarks with the directory paths associated with them.

In case you need more than nine bookmarks, simply extend the lines in your .bashrc or .bash_profile file to run through more numbers, or use some other bookmark naming convention that works for you.

Enjoy.

P.S.: A quick Google search points to the author’s page, which links to a more advanced solution – bashmarks.

Dizzying but invisible depth

Dizzying but invisible depth

Here is an inspirational Google+ post from the Google employee Jean-Baptiste Queru, on the subject of technological complexity.  It goes all the way from “What happens when you go to www.google.com?“, through the layers, through communication gap between technical and non-technical people, to the point of why people talked more about Steve Job’s death rather than Dennis Ritchie’s passing, even though the impact of the last one on the technology in general is much bigger.  He even touches on the problem with the patent system a bit.

Today’s computers are so complex that they can only be designed and manufactured with slightly less complex computers. In turn the computers used for the design and manufacture are so complex that they themselves can only be designed and manufactured with slightly less complex computers. You’d have to go through many such loops to get back to a level that could possibly be re-built from scratch.

Once you start to understand how our modern devices work and how they’re created, it’s impossible to not be dizzy about the depth of everything that’s involved, and to not be in awe about the fact that they work at all, when Murphy’s law says that they simply shouldn’t possibly work.

For non-technologists, this is all a black box. That is a great success of technology: all those layers of complexity are entirely hidden and people can use them without even knowing that they exist at all. That is the reason why many people can find computers so frustrating to use: there are so many things that can possibly go wrong that some of them inevitably will, but the complexity goes so deep that it’s impossible for most users to be able to do anything about any error.

That is also why it’s so hard for technologists and non-technologists to communicate together: technologists know too much about too many layers and non-technologists know too little about too few layers to be able to establish effective direct communication. The gap is so large that it’s not even possible any more to have a single person be an intermediate between those two groups

A must read.