Friday, 7 October 2022

Jenkins + Github + AWS Server

 

1. Create a git repo account on github.com

2. Create a nextjs project on local pc.

3. Upload the project on github.

4. Your genkins should be install on server. Login to Jenkins

5. Open putty key generator. Clik on Generate button. 
            Click on Save private key. Save the file with extension .ppk
            Copy Public key key .


6. In github account, In settings click on Deploy keys and then click Add deploy key.    

7.     Paste the public key that was copied from putty.

8. Set the ppk file.


9.  Create a   new freestyle project. Update the fields.



10. Settings for notification.






How to get geo location on registration in laravel?

Get Geo - location details 

 function getLocationInfoByIp(){

    $client  = @$_SERVER['HTTP_CLIENT_IP'];

    $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];

    $remote  = @$_SERVER['REMOTE_ADDR'];

    $result  = array('country_name'=>'', 'time_zone'=>'');

    if(filter_var($client, FILTER_VALIDATE_IP)){

        $ip = $client;

    }elseif(filter_var($forward, FILTER_VALIDATE_IP)){

        $ip = $forward;

    }else{

        $ip = $remote;

    }    

    $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip));    

      

    if($ip_data && $ip_data->geoplugin_countryName != null){

        $result['country_name'] = $ip_data->geoplugin_countryName;

        $result['time_zone'] = $ip_data->geoplugin_timezone;

    }

    return $result;

}

Machine Learning - Potato Leaf Disease Prediction

Step 1: import numpy as np import pandas as pd import splitfolders import matplotlib.pyplot as plt import tensorflow as tf from tensorflow i...