Saturday, August 31, 2013

Tagged under: , , ,

Hotkey to close Chrome Download Bar

If you're using Chrome, after any download completes, Download Bar will appear at the bottom of your browser. It sticks at there and occupies a space until you press X to close it.








It's very annoying. Google doesn't support any official hotkey to close it but here's the tricky way:

Press Ctrl + J (open Downloads tab)
then Press Ctrl + W (to close it)
and the Download Bar will go away!

Tuesday, August 27, 2013

Tagged under: , , , ,

Common commands in Ubuntu

Manage software packages:

Update package list (you should do this before running all commands below):
sudo apt-get-update
Install: sudo apt-get install <name>
Remove: sudo apt-get remove <name>
Remove and remove configuration files:
sudo apt-get remove <name> --purge
Search: apt-cache search <name>
List installed packages: sudo dpkg --get-selections



Wednesday, August 21, 2013

Tagged under: , ,

How to overcome the Facebook security check of identifying friends by their photo

Whether you created a real Facebook account or a fake one, sometimes you may be encounter a kind of Facebook security check that requires you to identify your friends by their photo or Facebook won't let you to access your account. Here's how I overcome it.

First thing to say is I don't know exactly the rules that Facebook staff use to identify fake account. But I think if you make friend with some people regularly day by day, someday Facebook will think your account is fake and it requires you to pass its check to continue to use your account.

The most difficult thing here is the check only available in a specific amount of time. If it takes you too much time to identify your friends, you will be failed and you must wait an hour to try again!

Ok, and this is how I overcome it.

When Facebook shows me first 3 random photos of someone in my friend list and a auto-complete textfield to enter his/her name, I use this textfield to get all the names in my friend list. I type A, and the textfield will suggest me all the names begin with A. Just do like this until Z and I will get my friend list.

After that, I use another Facebook account to search every friend, check their public photos (Facebook always uses public photos in the check) and remember every face of them. For more convenience, I save one of their photos and name the file with their name. Finally, I wait an hour and do the check again.

I know this way take time and effort much but so far it's may be the only way to solve my problem.

Tuesday, August 20, 2013

Tagged under: , , , , ,

How to enable Apache2 URL Rewrite in Ubuntu

URL Rewite makes your website's URLs easier to read, to remember and more friendly to search engines. I'm using Drupal and if I want to use Clean URLs function, I have to enable URL Rewrite in Apache2. Here's how I did.

Firstly, I switch to root account:
sudo su

Then I enable the rewrite module in Apache2 with:
a2enmod rewrite

I check to see if the module worked by running:
apache2ctl -M
If you see rewrite_module on the list, it's ok

Go to the folder /etc/apache2/sites-available/, and find the file which is named similarly to your website name (Ex: business.dev). If there's not such file, use the file named default.
Open the file by an editor and look for Directory code block which contains the path to your website, leave other Directory code blocks untouched. Change:
AllowOverride None to  AllowOverride All

This action allows .htaccess files (like Drupal's) override the settings of Apache and makes URL Rewrite function work.

Restart Apache:
service apache2 restart

Done!
Tagged under: , , , ,

How to create Apache virtual hosts in Ubuntu

Virtual host system help you to develop and manage your local websites easily by mapping them to friendly names like mybusiness.dev or myclient.com instead of localhost/mybusiness or localhost/myclient. With these names, your websites will run like real websites on the Internet, but remember, these names only work locally on your computer. Here's how to do it.

Go to the Apache folder named /etc/apache2/sites-available
You'll see a file named default, create a copy of it and name the copy with your website name (Ex: company.dev).

Open this file and change all existing domain names and paths here to the domain name you've just choose and the path to the folder contain your website.

Finally, you have to active this virtual host by running this command in terminal:
sudo a2ensite company.dev

Add this line to the file /etc/hosts to map the name to localhost, not to the Internet:
127.0.0.1 example.dev

Restart Apache and test
service apache2 restart

Notice that in some browser like Chrome, may be you have to type "http://compnay.dev", not just "company.dev". Chrome can misunderstand and think it an address on the Internet.

Monday, August 19, 2013

Tagged under: , ,

How to refresh favicon of Blogger

You're using Blogger and you've just uploaded your own favicon, but nothing changes? Here's how to refresh it!

Firstly, try to use Ctrl + F5 (or Cmd + F5 on Mac) on your browser to refresh. If it does not work, go to next fix.

Go to this address: yourblog.blogspot.com/favicon.ico
If you see the B icon of Blogger, use Ctrl + F5 (or Cmd + F5 on Mac). It will be refreshed and you will see your icon. After that, go to your blog (yourblog.blogspot.com) and use the same hotkey to refresh it. Done!

Another solution is clearing all the browser caches. Use Ctrl + Shift + Delete to open the cache clearing dialog box, check all the options, choose the time to clear from the beginning and press Clear or something like that and then refresh your blog.