Linux Awesome Usage

How to use projector when use awesome Just run cmd $ xrandr --output VGA1 --auto Install Awesome yum install -y awesome copy .config/awesome/rc.lua copy .xinit and .Xresources yum install -y xorg-x11-xinit

Linux MySql Usage

Install 1 2 3 4 5 6 7 8 9 $ sudo dnf install community-mysql-server $ sudo systemctl enable mysqld $ sudo systemctl start mysqld $ sudo mysql_secure_installation $ sudo mysql -u root -p mysql> show databases; mysql> exit User Usage Start Mysql mysqladmin start/restart/shutdown Connect Mysql $ mysql -u root -p Exit Mysql > exit change passwd mysqladmin -u $user_name -p $old_pass password $new_pass or in mysql cmd >

Vim Tips

merge two files together in vim test : :read file.name just run cat file.1 file.2 > file.merge or cat file.* > file.merge Sed remove all spaces behind the lines %s/\s\+$//g remove line with charactor you wont like g/somestring/, d Encoding Show file encoding file $file or in vim :set fileencoding If you only want to see all kinds of encoding files, just edit ~/.vimrc set encoding=utf-8 fileencodings=ucs-bom,utf-8,cp936 Change encoding :set fileencoding=utf-8 Other ways to change encoding : lconv convmv Delete BOM remove UTF-8 BOM :set nobomb keep UTF-8 BOM :set bomb About how to search special characters Referencd : http://vimcdoc.

How to install JAVA plugins for chrome/firefox in fedora18

Step 1: download Linux x64 RPM in http://www.java.com/en/download/manual.jsp?locale=en Step 2: open terminal and type the following su - cd /home/username/Downloads (replace username with yours) rpm -ivh jre-7u11-linux-x64.rpm you will see some few errors but its ok Step 3: updatedb locate libnpjp2.so copy the path of the libnpjp2.so file Step 4a: (Firefox Users) cd /home/user/.mozilla/plugins (replace user with your username) ln -s path/of/libnpjp.so Step 4b: (Chrome Users) cd /opt/google/chrome/ mkdir plugins cd plugins ln -s path/of/libnpjp.

Remove Title Bar From Gnome3

Only affect the default theme, Adwaita. Open your Adwaita xml (/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml) file and change the line that configures the maximized window (name=”max”). Add has_title=”false” to the “frame_geometry” tag. Then look for “title_vertical_pad”, and change “value=8″ to value=”1″. Restart Gnome 3 and maximize a window. Interestingly, you can still drag down from a menu or button bar to return to a normal sized window and get your duplicate titlebar back. something like this <frame_geometry name="max” has_title="false” title_scale="medium” parent="normal” rounded_top_left="false” rounded_top_right="false"> </frame_geometry>