is a very useful feature of SSH protocol. I’ve used it all the time to connect to a LAN network from public / DMZ network. At extreme case, I’ve created a tunnel that goes to another tunnel to reach the host. So how do you do it?
SSH Tunneling using PuTTY
PuTTY is my favorite SSH client [...]
Posted on January 11th, 2009 under Windows • No Comments
SSH tunneling is, I think, one of the most powerful and important feature of SSH protocol. It’s also known as port forwarding. So what is port forwarding? The easiest thing to explain this, I think, is by example.
Let’s say you have your own server or a hosting account with shell access at some company. Let’s [...]
Posted on January 11th, 2009 under System Admin • 1 Comment
As the final question in one of my interviews a while ago, I was asked to compute the average degrees of separation in social networking site. If you don’t know what degree of separation, here’s an example.
Amy is a friend of Robert. Therefore, Amy and Robert are 1st degree friend. Robert is a friend of [...]
Posted on January 9th, 2009 under General / Algorithm, PHP • No Comments
Error can’t create table …
I was trying to add new table and alter another table to add new column and foreign key to the new table. Here’s basically what I had
CREATE TABLE `chapters` (
`chapter_id` int(10) unsigned NOT NULL auto_increment,
`chapter_title` varchar(255) NOT NULL,
PRIMARY KEY (`chapter_id`)
);
ALTER TABLE `articles`
[...]
Posted on January 8th, 2009 under MySQL • No Comments
How would you like to optimize a 10 minute query down to 24 seconds? This was an optimization I had to do at work and I thought I’d share this with anyone. Even though I was using MySQL as an example, I think the technique should work on any database. Let’s say you have a [...]
Posted on January 8th, 2009 under General SQL • 2 Comments