Thursday 29 November 2018

Docker machine creation - Too many retries waiting for SSH to be available -Maximum number of retries (60) exceeded

Docker machine creation - Too many retries waiting for SSH to be available -Maximum number of retries (60) exceeded

To resolve the issue for 
Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. 
Last error: Maximum number of retries (60) exceeded


Run the following following steps:

1. Check your docker version:
$ docker -v
Docker version 18.03.0-ce, build 0520e24


2. Download your docker version's of `boot2docker` (18.03.0-ce) from here into your local:
wget https://github.com/boot2docker/boot2docker/releases/download/v18.03.0-ce/boot2docker.iso -P ~/.docker/machine/cache/test/boot2docker-v18-03-0-ce.iso


3. Create the `new_virtual_box_name` using the downloaded version of `boot2docker`:
docker-machine create --driver virtualbox --virtualbox-boot2docker-url ~/.docker/machine/cache/test/boot2docker-v18-03-0-ce.iso new_virtual_box_name


Tuesday 13 November 2018

SAML Auth login issue on local - undefined logger()

(1/1) FatalThrowableError
Call to undefined function App\Http\Controllers\logger()

in SamlController.php line 85
at SamlController->acs()
at call_user_func_array(array(object(SamlController), 'acs'), array())
in BoundMethod.php line 29


Enable the Saml debugger by adding the `SAML2_DEBUG=true` on .env.

Then, found the following error:
openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate!
Whoops, looks like something went wrong.
(1/1) FatalThrowableError
Call to undefined function App\Http\Controllers\logger()

in SamlController.php line 87
at SamlController->acs()
at call_user_func_array(array(object(SamlController), 'acs'), array())
in BoundMethod.php line 29
at BoundMethod::Illuminate\Container\{closure}()
in BoundMethod.php line 87


Resolved the issue after updating with the correct `SAML2_IDP_X509CERT` value.

Friday 25 May 2018

Angular production test locally with hostName, Port and SSL on

ng serve --prod --build-optimizer --ssl --host demo.yourdomain.local --port 4202

Thursday 1 March 2018

Useful docker commands for cleaning up containers, images and volumes

List of useful docker commands for cleaning up containers, images and volumes:

docker stop $(docker ps -aq // Stop all containers
docker rm $(docker ps -aq) // Remove all containers
docker rmi $(docker images -q) // Remove all images
docker volume ls // List all volumes
docker volume ls -q -f dangling=true // List all dangling volumes
docker volume rm `docker volume ls -q -f dangling=true` // remove all dangling volumes

Friday 16 February 2018

Add sticky content with jQuery

Steps:

1. Add the following on your css file.
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5;
}

2. Add the following on your JS file where you need to display the sticky when scrolling up.
jQuery(window).scroll(function(){
    if (jQuery(window).scrollTop() >= 200) {
        jQuery('.classNameOfStickyContentHere').addClass('fixed-header');
    }
    else {
        jQuery('.classNameOfStickyContentHere').removeClass('fixed-header');
    }
});

3. HTML Content
Display me as sticky when scrolling up....