RDP In Ubuntu with VirtualBox

Sometimes the display gets a bit wonky when using Ubuntu in VirtualBox and using RDP, install the following to fix the resolution detection and display.

$ sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

How To Create A Wine Shortcut – Ubuntu 14.04

Refer: http://nextdime.wordpress.com/2014/06/20/how-to-create-a-wine-shortcut-in-ubuntu/

You can create by hand a desktop shortcut for your applications installed with wine by following these steps:

Open your favourite text editor (gedit, nano, etc.), create a new file with the following content and save it to your Desktop with a name having extension .desktopIn this example, I’ve chosen to the name inetexplorer.desktop and saved it to my desktop.

[Desktop Entry]
Name=Internet Explorer
Exec=wine "C:\Program Files\Internet Explorer\iexplore.exe"
Icon=/path/to/iconfile
Type=Application
Categories=Wine;

Here, replace the value for Name field with that of the target application’s name. (In the example, it’s Internet Exolorer.) The value of Exec would be in the format:

wine "C:\path to the\executable file"

for GUI applications:
wineconsole "C:\path to the\executable file"

for CLI application like say:
wine "C:\Program Files\Internet Explorer\iexplore.exe"

enclosing the path within double quotes ".. .." is important if the path contain blank spaces.

Replace /path/to/iconfile (the value for Icon field) with the path of an icon file
likeIcon=/home/username/Pictures/internet-explorer.png) or you can omit this line of entry.

On the left is a shortcut with icon specified, for the one on right, not. iconField
Turn on the file’s execute bit on.Graphically you can do it by right clicking the .desktop file, and from the context menu selectProperties. In the properties window, select Permission tab, look for a label Execute: and check-mark the check-box next to it so that the shortcut becomes executable.

selecting property from right-click context menu rightClickTheFile

setting execute permission executableProperty

From terminal, you can do this with:

chmod +x $USER/Desktop/inetexplorer.desktop
where $USER/Desktop/inetexplorer.desktop should be the absolute path of the desktop shortcut that was created.

AD Firefox in Ubuntu – firefox 401 – Unauthorized: Access

Get the following error message:
Unauthorized: Access is denied due to invalid credentials

As part of Firefox 30's release, Mozilla made a change to disable support for NT LAN Manager version 1 (NTLMv1) network authentication. This change affects sites using Microsoft’s SharePoint or IIS services. The Windows version of Firefox 30 should switch to using NTLMv2 authentication automatically, but NTLMv2 is not supported by Firefox on non-Windows platforms.

The result for non-Windows platforms is that access may be blocked when Firefox 30 users try to access those kinds of sites.

To Enable NTLMv1 in Firefox

  • Open Firefox
  • In the address bar, enter the following: about:config
  • If prompted, click on the I’ll be careful, I promise! button.
  • Search for the following: network.negotiate-auth.allow-insecure-ntlm-v1
  • Once the network.negotiate-auth.allow-insecure-ntlm-v1 setting is located, double-click on the setting.
  • That should change the entry in the Value column from false to true.
  • Once the network.negotiate-auth.allow-insecure-ntlm-v1 setting has been set to true, close the Firefox browser window.
  • Open a new browser window and attempt to access the SharePoint-based or IIS-backed site. You should now be able to log in.

Refer: http://stackoverflow.com/questions/24372490/iis-server-7-0-returning-a-401-unauthorized-access-on-firefox-macos-only

Start VPN from Command Line in Ubuntu

Show Connections

$ nmcli con

Start a Connection

$ nmcli con up id gateway.hollandamerica.com
$ nmcli con up id ConnectName

Stop a Connection

$ nmcli con down id gateway.hollandamerica.com
$ nmcli con down id ConnectionName

Refer: http://askubuntu.com/questions/57339/connect-disconnect-from-vpn-from-the-command-line

 

Ubuntu 14.04 Tweaks

Using Ubuntu 14.04 in Virtual Box on the Macbook Pro starting working really well, and I was able to take advantage of many of the advance features.  It does cause the fan to kick on when it runs for a while.

These settings really bumped up the performance

  • The clipboard bi-directional worked and so did the drag-n-drop setting
  • Motherboard, Extended Features, Enable I/O Apic
  • Use extra processor cores
  • Processor, Extended Features, Enable PAE/NX
  • Acceleration, Enable VT-x/AMD-V and Enabled Nested Paging
  • Video Memory 64 Meg
  • Storage, Controller SATA, Use Host I/O Cache - Really help YouTube Playback

AngularJS Mock Services rest-tool

Here is the information about the rest-tool project, originally introduced by Gyorgy.

NPM source
https://www.npmjs.org/package/rest-tool

Project documentation
http://tombenke.github.io/rest-tool/

Quick Start Guide
http://tombenke.github.io/rest-tool/docs/getStarted.html

Install NPM modules
http://tombenke.github.io/rest-tool/docs/getStarted.html#installation

Create a simple project
http://tombenke.github.io/rest-tool/docs/getStarted.html#create-your-first-rest-api-project

Resize your VirtualBox

http://stackoverflow.com/questions/11659005/how-to-resize-a-virtualbox-vmdk-file

C:\Users\mruckman\VirtualBox VMs\Ubuntu-12.04-64-bit-16Gig-WINT-MLR\
Ubuntu-12.04-64-bit-16Gig-WCS-DEMO-disk1.vmdk

"C:\Program Files\Oracle\VirtualBox\VBoxManage" clonehd "Ubuntu-12.04-64-bit-16Gig-WCS-DEMO-disk1.vmdk" "cloned.vdi" --format vdi
"C:\Program Files\Oracle\VirtualBox\VBoxManage" modifyhd "cloned.vdi" --resize 51200
"C:\Program Files\Oracle\VirtualBox\VBoxManage" clonehd "cloned.vdi" "Ubuntu-12.04-64-bit-50Gig-WINT-MLR-disk1.vmdk" --format vmdk

Then you need to use gParted for LiveCD

Installing MongoDB in Ubuntu 12.04

Unable to install latest version in Ubuntu 12.04
Refer: http://gordoncluster.wordpress.com/2013/07/12/how-to-install-mongodb-on-virtualbox-ubuntu-12-04/

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo apt-get update

We're going to specifically install an older version (you will need to run this as root):
sudo su -
apt-get install mongodb-10gen=2.2.3

The service should already be running, the output: mongodb start/running, process 2254
sudo service mongodb status | stop | start

now we just run:
mongo

The output you should see is:
MongoDB shell version: 2.2.3
connecting to: test
>

UI Tools
http://www.robomongo.org/

MongoDB Restore

$ mongorestore --drop testcms

Using canned mockup with booking flow

Refer: https://www.npmjs.org/package/canned

  • $ npm install canned
  • Unzip canned responses in bookingflow folder canned.zip
  • Update configuration.js file
    cmsUrl: 'http://localhost:3000/hal-cms',
    dsUrl: 'http://localhost:3000/hal-ds',
  • Launch canned server from root of bookingflow, default port is 3000, left here for documentation
    ./node_modules/canned/bin/canned -p 3000 ./canned

Limitation, rest calls that return images do not work properly.

Example on how to define a call

  • You will need to determine if it is a get or a post to generate the proper index file of either index.post.json or index.get.json, see the last statement of example
  • Use chrome to get the URL of the rest call, and then also to get the curl version of the rest call
  • You can string all of these together and create a bash script to do everything at once

mkdir -p /home/mruckman/Documents/bookingflow/canned/hal-ds/rest/pricing/v1.0.0/companyCode/HAL/cpp/countryCode/US

cd /home/mruckman/Documents/bookingflow/canned/hal-ds/rest/pricing/v1.0.0/companyCode/HAL/cpp/countryCode/US

curl 'https://qabook.hollandamerica.com/hal-ds/rest/pricing/v1.0.0/...