replace depth=4 by whatever number will give you better precision
#subversion – backup repository
To backup a repository, run:
#github – Port Subversion repository to github
I’m in the process of porting my subversion repositories to github. This is the main command line that you would need to run from within an empty folder.
- here I am using svn2git github.com/nirvdrum/svn2git
- authors.txt is a file that contains a list of svn authors and their conversion to github authors
- you might run into a problem with authentication
- if the process is stuck at authenticating realm, just type the password and it will continue
- git-svn with git extenstions stuck on Authentication realm
Push the converted repository to github by running:
git push --all
git push --tags
more details can be found in this blog post Converting confused SVN repositories into Git repositories
You may encounter an error regarding the tip of your current repository being behind the remote repository. This could happen if you created a readme.md file in github when you created your repository. To resolve this, you will need to merge your local repository using:
#nodejs – Callback Error Pass-Through
The convention for nodejs [express/connect] is to use callbacks with a two argument signature, the first representing an error, the second the response/result.
// ...
}
Hence an async call chain will look something like this:
async_action(arg1, arg2, function(err, res){
if (err) {
cb(err);
} else {
var res2 = sync_action(res);
cb(undefined, res2);
}
);
}
Notice the if check block; often we just want to bubble the error out to the parent callback [cb] and we have this if block pattern all over the place; a good idea is to create a helper error pass-through as follows:
return function(err, res) {
if (!err) {
ok_cb(err, res);
} else {
console.log('error.if_ok', err.stack || err);
next(err, res);
}
};
};
Then your original function makes use of if_ok:
async_action(arg1, arg2, if_ok(cb, function(err, res){
var res2 = sync_action(res);
cb(undefined, res2);
}));
}
#coding – where to start when coding a reusable component?
What makes a component reusable? Why do some projects on github pick up while others just die?
Usability first!
As a component developer, make sure that you write your component with two key aspects in mind; input and output.
As long as your code has a usable input layer and a usable output layer you will find those that are interested in using it.

The logic that implements the transformation in between the input and output can always be reworked, improved or swapped out; what truly matters to the component’s consumer is the contract.
With the importance of the contract in mind; I generally start coding the input/output interface, then the input/output chock points, followed by the actual logic.
If you don’t want your fellow developers to hate you, please follow this advice!
#bootstrap – Global page loading indicator
You can create a simple and elegant loading indicator using a few lines of bootstrap markup and css.
First the mark up, in Jade:
.container
.span8.offset2
.progress.progress-striped.active
.bar(style="width: 100%;")
then the CSS …
position: absolute;
top: 50%;
}
tip #13 – Ubuntu – find process listening to port 80
No explanation needed!
tip #12 – StarCraft 2 replay stutter
If you are having problems with your StarCraft 2 replays stuttering [freezing for 2 seconds every 10 on 4 or 8x speed] then your problem is most likely a slow hard-drive.
In my case, even with an SSD I saw the stutter, as it turns out I needed to update my SSD’s firmware.
On the Crucial C300 128gb I saw improvements of 1.2-1.5x on benchmarks by upgrading to firmware 007 from 002.
#future – multiple tablets
How many tablets will we have in the future? will it be one iPad per family? One per person? Or multiple tablets per person?
There is a lot of factors to take into consideration, but we can generally agree that as time goes by, tablet prices, weight and power requirements will fall. We will not have any obstacles in having multiple tablets each; we will have a desk of tablets:
The most important part of a tablet is the screen, and having multiple screens around us is an effective way of switching context without having to lose track of what we were doing 2 seconds ago. Context ‘homework’ is on the left of the desk, context ‘chat with children’ is on the right of the desk. Why have only one screen when we can have many…
It is with that view of the future, that I believe that the best tablet is the cheapest [functional] tablet. The more of them I can have, the better.
What about on the go? I don’t want to carry multiple tablet, what product should fill that void?
For now the best product to fill the on the go market would probably still be a hard clam-shell. until we have figured out a new better way of input, the keyboard is still needed, and it needs to be self supporting with a hard bottom.
Again, as mentioned with the tablets; screen size it king, if I am only carrying around 1 device, it better have a larger screen.


