Archive for June, 2011

Disable Selection With CSS

Jun 27 2011 Published by under Web

* {
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-o-user-select: none;
	user-select: none;
}

Comments Off

Accessing Samba Share from Console

Jun 20 2011 Published by under Samba,Shell

First, list all shared folders on a remote computer

$ smbclient -L 192.168.1.16

Response looks like this:

Enter haris's password:
Anonymous login successful
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.34]

	Sharename       Type      Comment
	---------       ----      -------
	Public          Disk      My Public folder

Then hook right to Public folder, for example

$ smbclient //192.168.1.16/Public

After successful login, you will get a command prompt.

Enter haris's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.34]
smb: \> ls
  .                                   D        0  Fri Jun 17 09:02:43 2011
  ..                                  D        0  Fri May 20 00:44:39 2011

Type help to display all available commands

Comments Off

Accessing Apache Virtual Host from VirtualBox

Jun 10 2011 Published by under Apache,VirtualBox

On my Ubuntu I run Apache vhost for each of my projects.

Now, wouldn’t it be cool if you could access your Apache vhost from IE running in VirtualBox!?

I managed to solve this problem by editing a Vbox instance settings:

Settings: Network: Adapter 1: Attached to: Bridged Adapter

Start a VirtualBox instance and type http://localhost in IE and you’ll see a localhost running on Ubuntu.

Now, associate IP address to a host name in Windows (192.168.1.38 is my Ubuntu IP address)

# c:/Windows/System32/drivers/etc/hosts
192.168.1.38	projectx.local

and Ubuntu

# /etc/hosts
192.168.1.38	projectx.local

Then create a new Apache config file

#/etc/apache2/sites-available/vbox-projectx
<VirtualHost projectx.local>
DocumentRoot /var/www/projectx
</VirtualHost>

Enable the config

$ sudo a2ensite vbox-projectx
$ sudo /etc/init.d/apache2 restart

Now, in IE (running in VirtualBox) type http://projectx.local and… that’s it

Comments Off

Performance Optimization WordPress Plugins by W3 EDGE