Fixing Video Display of Windows 10 in Parallels

Issue with remote desktop scaling too small, need to adjust Windows 10 to NOT use retina display.

Refer: http://blog.parallels.com/2015/08/18/how-to-configure-the-best-display-settings-for-parallels-desktop-on-a-retina-mac/

2016-05-18_10-31-44_1

2016-05-18_10-31-44_2

2016-05-18_10-31-44_3

Using eTags

Refer: http://thespringthing.blogspot.com/2015/06/etags-and-browser-cache.html

ETags and browser cache
Caching resources on the browser is one of the patterns followed to minimize redundant trips to the server and thus reduce load on the server. This works well for data that is static. But, there are cases where the data changes every once in a while (although less frequently) and you would want the browser to get the latest data without waiting for the cached data to expire. e.g. changes to a css or javascript in the new version of the application should be reflected immediately on the browser. To handle these refreshes, you might be tempted to make it a non-cacheable resource. Entity tags( or ETags for short) help you cache such resources.

ETag is a unique identifier that represents the response content of a request. By comparing Etags, you should be able to tell if the response for a request has changed or not, and decide if you need to send the new data back to the client or just use the cached data.

HTTP supports ETag response headers which can be used along with If-None-Match request headers for managing cache data. These headers are meant to be used for GET and HEAD requests, which are the recommended methods for fetching cacheable resources.

The following sequence diagrams illustrates the ETag workflow for an example of 3-step resource fetch. Each step requests for the same resource.

Step 1
Browser sends a request for a resource
Server creates an ETag value for the resource using hash or other techniques.
Server sets this value in "ETag" header in response.
Server sends the resource along with ETag.
Client caches the resource and the ETag

Step 2
Client requests for the same resource
Client sends the ETag value for the resource through the If-None-Match header.
Server calculates the ETag for the resource.
Server compares the new ETag with If-None-Match.
If it matches, then server sends a 304 response code.
Client uses the data from cache.

Step 3
Client requests for the same resource.
Client sends the ETag value for the resource through the If-None-Match header.
Server calculates the ETag for the resource.
Server compares the new ETag with If-None-Match.
If it does not match, then server sets the ETag response header with the new value.
Server sends the resource along with ETag.
Client caches the new resource and the ETag

ETag generation

ETag generation in itself could add some amount of latency, depending upon the techniques used. The simplest technique to calculate is to generate a hash of the content through MD5 algorithm or something similar. This could be pretty sluggish depending upon the size of the content.
The ETag need not necessarily be unique, as long as it can indicate the change in the content. For example, in one of my projects I used the content version as the ETag. The version indicated change in the content and that was good enough for me to refresh the cache.

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