Installing Certificates on Mac

From: "Fnu, Preeti (HA Group)" <PFnu@HollandAmericaGroup.com>
Subject: Re: Lingering cert issues - causing work stoppage
Date: May 5, 2017 at 1:33:50 PM PDT

These steps worked for me on Mac. Below are the steps

# Copy the certificate into the directory Java_home\Jre\Lib\Security
# Change your directory to Java_home\Jre\Lib\Security>
# Import the certificate to a trust store.

$ keytool -import -alias comodoaddtrustexternalcaroot -file COMODOAddTrustExternalCARoot.cer -keystore cacerts -storepass changeit

$ keytool -import -alias comodorsacertauthority -file COMODORSACertAuthority.cer -keystore cacerts -storepass changeit

$ keytool -import -alias addtrustexternalca -file AddTrustExternalCARoot.cer -keystore cacerts -storepass changeit

Load Balance in nginx

Example setting load balancing between 2 servers

$ sudo gedit /etc/nginx/sites-available/default

upstream talproxy {
server 10.7.19.75:12940 weight=2;
server 10.7.19.3:12940 weight=1;
}

server {
... REMOVED TO SAVE SPACE ...

### BEGIN PATCH ###
location /talproxy {
proxy_pass http://talproxy/;
}

ImageMagic – Swapping Colors in PNG or JPG Files

Installing ImageMagic
$ sudo apt-get install imagemagick imagemagick-doc

The new Yellow Colors are this:

Selected state: #FFCB66
Hover state: #FCB614

The interesting thing about ImageMagic is the convert actually has the target color first and the color to replace second, as a parameter.

In order to change the colors for the location_and_decks, do the following:

Use the PNG files because they are lossless and convert them.

This is for changing blue to yellow for the selected items

for f in *.png; do
convert ./"$f" -fuzz 0% -fill "#FFCB66" -opaque "#0D932C" ../../locations_and_decks/"$f"
done

Unfortunately, the hovers for blue, were the same color as the border, so we took the selected and converted them to hovers; however, the names needed to be changed too.

for f in *.png; do
convert ./"$f" -fuzz 0% -fill "#FCB614" -opaque "#0D932C" ../../locations_and_decks/hover/"$f"
done

After getting all of the PNG's into the same folder you can use the following to convert all of the PNG files into JPG files.

for f in *.png; do
convert ./"$f" -background white -flatten -alpha off ../locations_and_decks/"${f%.png}.jpg"
done

Installing Selenium Builder for Windows 10 and Ubuntu 14.04

The biggest issue was getting a version of Firefox that works, the workaround was to install the Firefox ESR Edition

Windows 10 Installation

Install Java JDK - jdk-8u111-windows-x64.exe

Install Python - python-2.7.12.msi
Choose advance configuration to add Python to class path

Install Firefox ESR Edition - "Firefox Setup 45.5.0esr.exe
https://www.mozilla.org/en-US/firefox/organizations/all/

Update your path variable to add this:
"C:\Program Files\Mozilla Firefox\"

Launch Firefox and install the Selenium Builder Plugin
https://addons.mozilla.org/en-us/firefox/addon/selenium-builder/

Download Selenium Jar File
http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar

Launch the Jar for command line
java -jar selenium-server-standalone-2.53.1.jar

You are now ready to record and playback via Firefox

---

Ubuntu 14.04 Installation

Install Java 8

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Remove current version of Firefox
$ sudo apt-get remove firefox

Download 64-bit version of Firefox
https://www.mozilla.org/en-US/firefox/organizations/all/

Extract Firefox
sudo tar -xvjf firefox-45.5.0esr.tar.bz2 -C /opt

Create Firefox ESR
sudo ln -s /opt/firefox/firefox /usr/bin/firefox

Create an icon
$ sudo apt-get install gnome-panel
$ sudo gnome-desktop-item-edit . --create-new

Updating
$ sudo apt-get install gksu
$ gksudo firefox

Remmina/Ubuntu 14.04

If you have having issues with Remove Desktop - Go to advance settings and set security specifically to RDP instead of negotiate and click "Save".

Dust versus AngularJS

JavaScript Framework Dust:
http://akdubya.github.io/dustjs/#guide

AngularJS versus Dust
Refer: http://stackoverflow.com/questions/15336187/what-is-the-difference-between-angularjs-and-dust-js

Dust.js is purely a templating module. So, it allows the combination of json with a template to deliver html output.

Angular.js is client side framework that allows binding of logic to variables defined in a template (your page).

So, with dust.js you are responsible for deciding when to run the json through the template. Typically you feed in the json on the server (or client) and ask it to render the results.

With angular.js when the model (the json) changes the framework re-renders as appropriate. Triggers for that change could be user actions (such as filling a form in) or it could be due to loading some fresh json from a service.

Typically you would use angular.js if you want a single page JS app (think gmail). dust.js is perhaps more akin to a traditional approach with multi pages with content driven by passing in json.

You could even use the both of them in tandem - server side rendering using dust.js with dynamic client side logic in angular.js.