Posts

Oracle Virtual Box: Set Wider Screen Resolution

Image
This is for a scenario where you installed Ubuntu in virtual box but the screen resolution is small. (640x480) From the Ubuntu screen, go to Devices > Install Guest Additions CD Image . This will mount the CD to your Ubuntu CDRom. Next, Click Run Software or run the file VBoxLinuxAddition.run as root user. Then reboot Ubuntu VM. Alternatively, you may install the packaged version from the terminal: sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 Then reboot. After that, you can then adjust the window size of your Ubuntu VM.

Git: Delete Branch From Local And Remote Repository

To delete a branch from a local repository: git branch -D my_test_branch Then to delete it from the remote repository: git push origin :my_test_branch or git push origin --delete my_test_branch Reference: http://git-scm.com/docs/git-branch http://git-scm.com/docs/git-push

Oracle Virtual Box: Access Windows (host) Folders and Drives from Ubuntu (guest)

Image
If you have an Ubuntu OS installed with Oracle Virtual Box, and your host OS is Windows, the following procedure will allow you to share drives or directories from Windows to Ubuntu. From you Ubuntu screen menu, go to Devices > Install Guest Additions CD Image . This will mount the CD to your Ubuntu CDRom. Next, Click Run Software or run the file VBoxLinuxAddition.run as root user. You may have to restart Ubuntu after this. After restart, go to Device > Shared Folder Settings . Click the (+) icon then create a name for the folder or drive to share. Also check the "Make Permanent" option. Now we're done with the shared folder. In my example, it's D_DRIVE for D: Then in Ubuntu, open Terminal and run the command below: sudo mount -t vboxsf <shared folder> <path to local directory> Here is my example: sudo mount -t vboxsf D_DRIVE /home/hanapiers/D_DRIVE You may also add the command in  /etc/rc.local  without the sudo .  This will ...

Install APC for PHP 5.5x in WampServer

Download APCu for PHP 5.5x http://pecl.php.net/package/APCu/4.0.6/windows Extract and copy php_apcu.dll to PHP extension directory C:\wamp\bin\php\php5.5.12\ext Enable APC extension in php.ini extension=php_apcu.dll Restart Wampserver

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...

Installing Git in Ubuntu

To install git, run: sudo apt-get install git After installing git, you may setup the following configuration: git config --global user.name "Your Github Name" git config --global user.email "email@example.com" git config --global color.ui true