Andres Vidal's Blog

Apr 18

[video]

[video]

[video]

Mar 11

Get a Static IP in Ubuntu (guest) - Win7 (host) on VirtualBox

Static (Fixed) IP Address in Ubuntu (guest) Windows 7 (host) VirtualBox

I’ll keep this quick and dirty. You may need a static IP in your networked machine for accessibility between other machines. This is also a great way to host a web development environment, locally.

First: Setup VirtualBox networking

Attached to: Bridged Adapter

Second: Update the guest system’s interface config with the desired static IP info.

$ sudo nano /etc/network/interfaces

Notice that I just added the necessary IP info:

address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1

Finally: Restart the networking interface. If you get errors loading the new interface config, check that the wrapping comments have a # in front of each line.

sudo /etc/init.d/networking restart

Done!

Also, checkout this article on setting up User’s public_html directories. Apache2: Activating User public_html Directories & Virtual Directories- Hosts- Domains under Ubuntu Linux for a Private LAN

Mar 09

[video]

Mar 04

Installing Virtualbox Guest Additions and Shared Folders on Windows 7

This post assumes that you have Virtualbox 4.1.8 running a fresh copy of Ubuntu 11.10 Server (guest) on Windows 7 (host). After hours of trying to figure out why I couldn’t get Guest Additions installed, I found the answer! I hope this helps…

Update & Upgrade apt-get and get dependancies for Guest Additions.

$ sudo apt-get update && sudo apt-get upgrade

$ sudo apt-get install dkms build-essential linux-headers-generic

Load the Guest Additions ISO from the main terminal window menu. I find it easier to mount this as a cdrom within the guest.

  1. Devices > CD/DVD Devices > Choose a virtual CD/DVD disk file…
  2. Browse to C:\Program Files\Oracle\VirtualBox and select VBoxGuestAdditions.iso

Mount the VBoxGuestAdditions.iso within Ubuntu.

$ sudo mount /dev/cdrom /media/cdrom

Install the Guest Additions.

$ sudo ./media/cdrom/VBoxLinuxAdditions.run

Reboot.

$ sudo reboot

Mounting Shared Folders. When creating the share folder from the main terminal’s menu, choose Auto-mount and Make Permanent.

With Linux guests, auto-mounted shared folders are mounted into the /media directory, along with the prefix sf_. For example, the shared folder myfiles would be mounted to /media/sf_myfiles on Linux and /mnt/sf_myfiles on Solaris.

NOTE: Access to auto-mounted shared folders is only granted to the user group vboxsf, which is created by the VirtualBox Guest Additions installer. Hence guest users have to be member of that group to have read/write access or to have read-only access in case the folder is not mapped writable.

Add a user to the vboxsf Group to access the mounted shared folders.

$ sudo usermod -G vboxsf -a 'name-of-user'

To assign the new group, log off and reconnect.

All done. At this point, you can access the mounted shared folder. Now, you can use symlinks to make it easier to work with.

Jan 25

Find Items in one Column not in the Other with MySQL

Super awesome query that puts MS Excel to shame!

SELECT * FROM Table1 WHERE Table1.principal NOT IN (SELECT principal FROM table2)

with data export to file:

SELECT *
INTO OUTFILE "c:/mydata.csv"
	FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
	LINES TERMINATED BY "\n"
FROM Table1
WHERE Table1.principal
NOT IN (SELECT principal FROM table2)

Oct 25

[video]

Sep 02

[video]

Aug 26

Styled Dropdown current release: v1.0

This release includes the functionality to close the drop down when the user clicks off it. If demand needs it, I’ll work on the blur with a timeout too. Enjoy.

Styled Dropdown

May 02

I thought this was interesting… The first tweets regarding the raid on Osama Bin Laden.

I thought this was interesting… The first tweets regarding the raid on Osama Bin Laden.

Apr 08

[video]

Feb 16

Code Lab Redesign

Just released my Code Lab redesign. Let me know what you think.

Feb 10

AJAX #HASH Based Navigation Needs Rethinking!