
Answering questions in interviews
Some quick tips on the recommended format of answers to interview questions.

Some quick tips on the recommended format of answers to interview questions.

Preparing for an interview can increase your self-confidence and reduce your risk, even if you never feel completely ready. Here are five key steps to help you get ready.

If you need for some reason to download a full website, wget is a nice tool to accomplish this. With “man wget” you can get a pretty good idea of all available features. I heard there is also a wget version for windows. Let us examine an example: -m stands for mirroring -k and -K convert the page with local links -E to convert to an html suffix –random-wait to add a random waiting period between requests wget -m -E -k -K -w 1 --random-wait -o logfile https://website_uri/path

You can disable directory browsing at several levels like everything else. In order to do that: Edit either the http.conf or a specific .conf file or the .htaccess file. If exists, look for “Option Indexes” Replace it or create a new line with “Options -Indexes”

After trying the gnome network configuration tool with little success, I tried the hardcore version, changing by hand the /etc/network/interfaces file again with little success. First search for your AP: iwlist eth1 scanning If you have a working wireless network adapter (eth1) and your AP in range, your configuration file should look something like this: auto eth1 iface eth1 inet dhcp wpa-driver wext wpa-ssid SSID wpa-ap-scan 1 wpa-proto WPA wpa-pairwise TKIP wpa-group TKIP wpa-key-mgmt WPA-PSK wpa-psk XXXXXXXXXXXXXXXXXXXXf4b3cff05d8ebf483435050268bxxxxxxxxxx Your key for wpa-psk can be generated using: ...

You can find it here: rpmfind.net/linux/rpm2html/search.php?query=&submit=Search+…&system=&arch=

In order to check the latest kernel version available just do this: finger @kernel.org And get an output similar to: [kernel.org] The latest stable version of the Linux kernel is: 2.6.22.4 The latest prepatch for the stable Linux kernel tree is: 2.6.23-rc3 The latest snapshot for the stable Linux kernel tree is: 2.6.23-rc3-git4 The latest 2.4 version of the Linux kernel is: 2.4.35.1 The latest 2.2 version of the Linux kernel is: 2.2.26 The latest prepatch for the 2.2 Linux kernel tree is: 2.2.27-rc2 The latest -mm patch to the stable Linux kernels is: 2.6.23-rc2-mm2

First install smbmount that should be on smbfs package, for Debian use something like: sudo apt-get install smbfs To try and access, create a new mounting point and connect: sudo mount -t smbfs -o username=<user>,workgroup=<domain> //winserver/share1 /share /share1 To make it permanent add this line to your /etc/fstab as root: //winserver/share1 /share/share1 smbfs credentials=/home/user/credentials,uid=user,gid=user,dmask=700,fmask=700 0 0 In order to avoid having passwords on your fstab create a file /home/user/credentials like this: ...

Tired of “time wget”, apache has a simple stress tool “apache benchmark” that goes like this: ab -kc 10 -t 10 -v 4 -A user:pass "https://uri/dir/file?param=x" > ab_result.txt

Filter invalid email addresses using shell script: Check for valid domain names cat email_addr.txt | cut -d "@" -f 2 | sort -u| xargs -I {} host -t MX '{}' | grep "not found"; Check for email address RFC compliance cat email_addr.txt | egrep "^[a-Z0-9,\!\#\$\%\&'\\*\+/=\?\^\\_\`\{\|\}\~\-]+(\.[a-Z0-9,\!\#\$\%\&'\\*\+/=\?\^\_\`\{\|\}\~\-]+)\*@[a-Z0-9-]+(\.[a-Z0-9-]+)\*\.([a-Z]{2,})$"