Pages

Apr 17, 2013

Add repository on Kali Linux

On the terminal type
vim /etc/apt/sources.list

Add the following lines if not available

deb http://http.kali.org/ /kali main contrib non-free
deb http://http.kali.org/ /wheezy main contrib non-free
deb http://http.kali.org/kali kali-dev main contrib non-free
deb http://http.kali.org/kali kali-dev main/debian-installer
deb-src http://http.kali.org/kali kali-dev main contrib non-free
deb http://http.kali.org/kali kali main contrib non-free
deb http://http.kali.org/kali kali main/debian-installer
deb-src http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

Save the file. Then run apt-get update and followed by apt-get upgrade

Apr 6, 2013

Install Google Chrome in Linux

Create a new Google Chrome repository file in /etc/yum.repos.d/google.repo. And Add following:

[Google-Chrome]
name=Google-Chrome - 32bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/i386
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

For 64bits just change i386 to x86_64

Now use yum to install Stable version of Google Chrome browser. You can use this tutorial for CentOS/RedHat/Fedora/Fuduntu and any distribution related RedHat

yum install google-chrome-stable

Mar 8, 2013

Set Date and Time on Linux

Check if your date and time are set correctly under your linux box.

#date
Fri Mar 8 13:40:44 BTT 2013

Set Date:

1. date +%Y%m%d -s "20130308"

Set Time:

1. date +%T%p -s "01:12:30PM"

Mar 7, 2013

Install MyUnity

MyUnity is also a must have app under Ubuntu. The app is used to customize recent used apps, display transparency, theme and so on. To install MyUnity just type the following command on your terminal.

sudo apt-get install myunity

Install Ubuntu Tweak using apt-get

Try if you can install Ubuntu Tweak app without having to add any new repository. Ubuntu Tweak is a must have app under Ubuntu, it is used to tweak some settings under ubuntu.

sudo apt-get install ubuntu-tweak

If you are not able to install then, follow the step:

1. sudo add-apt-repository ppa:tualatrix/ppa
2. sudo apt-get update
3. sudo apt-get install ubuntu-tweak

Mar 5, 2013

Hide Folder or File on Ubuntu

Rename the Folder or File with .(dot) before (meaning begin the name with .(dot)).
eg.
.Folder

To show hidden Folder or File just press Ctrl + H and press it again to again hide hidden files.

That's it folks.... :)

Mar 4, 2013

Install Google Chrome on Ubuntu using apt-get

Installing Google Chrome browser on Ubuntu:

1. wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
2. sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
3. sudo apt-get update
4. sudo apt-get install google-chrome-stable

Install VLC Player on Ubuntu using apt-get

To install VLC Player on ubuntu, try if you can install the App without having to add a new repository.

sudo apt-get install vlc

If you are unable to install then follow the steps given below:

1. Ctrl + Alt + T to open terminal
2. sudo add-apt-repository ppa:videolan/stable-daily
3. sudo apt-get update
4. sudo apt-get install vlc

Feb 26, 2013

SQL Server Transaction per interval

If you are wondering how much SQL transaction is happening on your database, run the below query.

DECLARE @First INT
DECLARE @Second INT
SELECT @First = cntr_value
FROM sys.dm_os_performance_counters
WHERE OBJECT_NAME = 'SQLServer:Databases' -- Change name of your server
AND counter_name = '%Transactions/sec%'
AND instance_name = '_Total'; -- Database name
-- delay time
WAITFOR DELAY '00:00:01'
SELECT @Second = cntr_value
FROM sys.dm_os_performance_counters
WHERE OBJECT_NAME = 'SQLServer:Databases' -- Change name of your server
AND counter_name = '%Transactions/sec%'
AND instance_name = '_Total'; -- Database name
SELECT (@Second - @First) 'TotalTransactions'
GO

If you are having some problem in execution, please confirm the OBJECT_NAME and instance_name by running select * FROM sys.dm_os_performance_counters. You can change the WAITFOR DELAY time to meet your time interval requirement. I have used currently 1 Second.

Feb 13, 2013

Postal Code for Bhutan

To know your postal code, go to this link -> http://www.bhutanpost.com.bt/postcode/postcode.php.

Postcode is a code of digits added to postal address to facilitate mail delivery. Each country has its own coding system and in some countries it is referred to as Zip Code.

Bhutan Post has 5-numeric digits code that indicates the following:
1. The first digit indicates the Region.
2. The second digit indicates the Dzongkhag
3. The third digit indicates the Dungkhag under a Dzongkhag
4. The last two digits indicate the delivery area, i.e, General Post Office (GPO)/Post Office (POs),Community Mail Office (CMOs)