Posts

Showing posts from October, 2014

MySQL Without The Login Prompt

There may be times when you want to use MySQL without the login prompt like when running cron jobs. For that MySQL has something called Option Files wherein you can specify commonly used options so you do not need to enter them in the command line. To use MySQL without the login prompt, create a file in your home directory: touch ~/.my.cnf Modify the file and paste the following configuration: [mysql] user=your_mysql_user password=your_mysql_password You may also specify your configuration for mysqldump so that you can backup files with cron periodically :) [mysqldump] user=my_user password=my_password

Install Sublime Text 2 in Ubuntu

1. Download Sublime Text 2 2. Unzip the downloaded file tar vxjf Sublime\ Text\ 2.0.2.tar.bz2 3. Move the Sublime Text 2 folder in /opt directory sudo mv Sublime\ Text\ 2 /opt/ 4. Create a symbolic link for sublime so that you can execute it anywhere using the terminal sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime Note that /usr/bin must be included in the $PATH variable for the symlink to work. 5. This time, create a desktop file so that sublime can also be executed through a launcher in the Unity . sudo sublime /usr/share/applications/sublime.desktop 6. Copy the following in sublime.desktop [Desktop Entry] Version=1.0 Name=Sublime Text 2 GenericName=Text Editor Exec=sublime Terminal=false Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow [NewWindow Shortcut Group] Name=New Window Exec=sublime -n TargetEnvironment=Unity 7. To set Sublime as the def...