Extract part of log file using less and sed

Sometimes when using less to view a log file, seem to need a little extra than just a screen full and the copy command just does not work well.  You can use the following two commands in combination to grab line numbers and then extract just those lines.

# Use this to get the line numbers
$ less -N hal-guest-server.log
# Use sed to extract that range to your home directory, notice the “little” p at the end of second line number
$ sed -n -e 32865,32966p hal-guest-server.log > ~/log-excerpt.txt

Update Parallel Tools from Command Line

Found that Parallel Tools seems to keep hanging when it needs to do an update.  If you cancel the auto updater it works much better from the command line.

$ sudo /media/<username>/Parallels\ Tools/install
Refer: http://kb.parallels.com/en/117044

VirtualBox guest OS accessing local server on host OS

Refer: http://superuser.com/questions/144453/virtualbox-guest-os-accessing-local-server-on-host-os

Enable ONE network adapter. Set it to NAT and start your machine. Don't need to configure anything.

On guest machine's browser type http://10.0.2.2 which will show you the same content as "localhost" in the host OS.

10.0.2.2 is the "default gateway" for NAT connections and your guest OS' IP is 10.0.2.15

Of course you can set a "HOST-ONLY" or an "Internal Network" which will allow you another advanced configurations. I recommend to stay with NAT.

Google Maps Saved Places

On the desktop version, it's hard to find save places for Google Maps; however, it's saved with Google Bookmarks:

https://www.google.com/bookmarks/lookup?sort=

Add exFat Support to Ubuntu

Works for Ubuntu 18.04.2 on 05/27/2019
Refer: https://itsfoss.com/mount-exfat/

$ sudo add-apt-repository universe
$ sudo apt update
$ sudo apt install exfat-fuse exfat-utils

Newer notes:

Refer: http://www.howtogeek.com/235655/how-to-mount-and-use-an-exfat-drive-on-linux/

$ sudo apt-get install exfat-fuse exfat-utils

Older notes that worked on Ubuntu 14.04 but reported errors

Refer: https://www.maketecheasier.com/access-exfat-file-system-in-ubuntu/

$ sudo add-apt-repository ppa:relan/exfat
$ sudo apt-get update
$ sudo apt-get install fuse fuse-exfat exfat-utils

In the event that your system doesn’t automount the external drive, here is what you can do to mount it manually:

$ sudo mkdir /media/exfat
$ sudo mount -t exfat /dev/sdb1 /media/exfat

Fixing Audio in Ubuntu Netbook 14.04

Fixing Audio
Refer: http://askubuntu.com/questions/508221/sound-input-device-microphone-not-working

I had a similar problem on 14.04, sound input source was blank in the 'Sound Settings'. I did the following, what did the trick is installing 'Audacity', for more info check the following link

sudo apt-get remove --purge alsa-base pulseaudio
sudo apt-get install alsa-base pulseaudio
sudo apt-get install audacity

Multiple Versions of Node

Booking flow needs older version of node until we can upgrade and OLCI needs the current version otherwise the DELETE calls fail, here's how we can use multiple versions:

Refer: https://davidwalsh.name/upgrade-nodejs
Refer: https://github.com/tj/n

# node -v which is v0.10.37 for booking flow, EAS is using 4 and booking flow works
$ sudo npm cache clean -f
$ sudo npm install -g n
$ sudo n 0.10.37
$ sudo n stable
# Now you switch between versions but running, selecting and hitting enter
$ sudo n