• missing xbfish.com image

Category Archives: Software

[Linux] Downloading files through Terminal (command line)

To download files through Linux Terminal, we can invoke the command wget.

Wget should be installed in all Linux distros. Otherwise, you may install it as follows:

Ubuntu/Debian

apt-get install wget

Fedora/CentOS

yum install wget

Wget will download the file and place it in your current navigated folder in the Terminal.

To download a single file from a webpage, issue the following command:

wget http://www.example.com/file.pdf

If you would like to download the entire website, include the -R (recursive) option:

wget -r http://www.example.com

Suppose you wanted to download all images from the website, include -R and -A options:

wget -r -A png,gif,jpg http://www.example.com

For more examples, please refer to http://www.go2linux.org/tips-and-tricks-of-wget-to-download-files or the official webpage.

Typing Trademark and Registered symbol on Windows

To type symbol, press ALT + 0153

To type ® symbol, press ALT + 0174

For other operating systems, do refer to fsymbols website.

[Linux] USB installer for Linux distro

Universal USB Installer allows you to live boot or install Linux from any USB drive.

Below is a screenshot of extracting Ubuntu into my USB thumbdrive:

missing xbfish.com image

Warning :: The extraction process will clear everything from your USB drive. Remember to backup data from your USB drive.

To download this software, do check out the official website.

[Linux] Resolving “PHP Deprecated” error when executing command

A while ago, I was facing the following error when running Facebook Command Line on my Linux:

PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0

To resolve this issue, open mcrypt.ini located at /etc/php5/cli/conf.d

You will see the following code snippet:

# configuration for php MCrypt module
extension=mcrypt.so

Replace the # with ;:

; configuration for php MCrypt module
extension=mcrypt.so

Hope this helps :)

Automatically refresh Mozilla Firefox

The Mozilla Firefox addons, ReloadEvery, is a useful tool for automatically refresh or reload your Firefox.

The function is embedded in the browser context menu and it also comes with custom timing input where you can set the automatic refresh rate:

missing xbfish.com image

This is particularly useful for me especially when adding tutorial slot is instantaneous in CORS.

Installing Ruby on Rails on Windows

Firstly, download the latest Ruby Installer for Windows.

Next, install Ruby using the installer. Check the following 2 boxes during the installation:

missing xbfish.com images

At the same Ruby Installer download page, download Ruby development kit and install it.

By default, Ruby Installer for Windows includes RubyGems. However, it is not the latest version. Go to RubyGems download page to get the latest RubyGems.

Extract the RubyGem package. Open up Windows command prompt and navigate to the extracted directory. Enter the following command:

ruby setup.rb

To check for gem version, enter the following command in the command prompt:

gem -v

After that, enter the following command to install Ruby on Rails:

gem install rails

To check for rails version, enter the following command in the command prompt:

rails -v

[Linux] Completely uninstall MySQL

Open up your Terminal and login as root by entering the following command:

sudo -s

Remove MySQL:

apt-get –purge remove mysql-server
apt-get –purge remove mysql-client
apt-get –purge remove mysql-common
 
apt-get autoremove
apt-get autoclean

Check if there are any MySQL dependencies installed:

apt-cache rdepends mysql-server
apt-cache rdepends mysql-client

Delete the preference files:

rm -rf /etc/mysql

Find all files with “mysql” and delete it:

find / -iname ‘mysql*’ -exec rm -rf {} \;

Reference : http://stuffthatspins.com/2011/01/08/ubuntu-10-x-completely-remove-and-clean-mysql-installation/

[Linux] Enable NO Password login in phpMyAdmin

phpMyAdmin in Linux by default does not allow NO Password login.

missing xbfish.com images

To fix this issue, sudo open the file in /etc/phpmyadmin/config.inc.php

Uncomment the following line:

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

[Linux] Completely remove apache2 in Ubuntu

Open up your terminal and login with root access:

sudo -s

Enter the following command to list all the installs of apache2:

dpkg --get-selections | grep apache2

Remove all the installs of apache2:

apt-get remove --purge apache2 XXXXXX  XXXXXX

where XXXX are the installs generated from the previous command.

To install apache2 again, you can execute the following command:

apt-get install apache2

[Linux] Gedit highlights for Ruby on Rails

By default, Gedit in Linux only supports Ruby or Ruby on Rails (RoR) syntax highlighting. You will find that RoR tags are not being highlighted even if the highlight mode is set to RubyOnRails.

To support highlighting of RoR tags in .rhtml or .html.erb files, install Gedit plugin called gmate.

Firstly, open up your Terminal and add Ubuntu on Rails PPA:

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update

Next, install gedit-gmate package:

sudo apt-get install gedit-gmate

Open a RoR file with Gedit. Go to View -> Highlight Mode -> Markup.

Check RHTML/ERB as the highlight mode.

xbfish.com

gmate plugin also shipped with various theme files for Gedit. For more information, do refer to gmate @ Github