first-child

<div class="ctr-1">
    <h3>Title1</h3>
    <div class="ctr-2">
        <h3>Title2</h3>
    </div>
</div>
hide first only
.ctr-1 > h3:first-child { display:none; }

hide two (first of a div)
.ctr-1 h3:first-child { display:none; }

axios interceptors – response errors

axios.interceptors.response.use(function (response) {
    // Do something with response data
    return response;
  }, 
  function (error) {
    const status = error.response ? error.response.status : null
    var config = error.config;
    console.log(config);
    console.log(status);
    error.config.__isRetryRequest = false;

    if (status === 500) { //500 Internal Server Error
        console.log('kartoti');
        error.config.__isRetryRequest = true;
        return axios(error.config);
    }

    if (status === 419) { //authorization
        window.location.href = "login";
    }

    if (status === 401) { //authorization
        window.location.href = "login";
        //axios(config);
        //axios.request(config);
    } 
    return Promise.reject(error);
  });
function retryFailedRequest (err) {
  if (err.status === 500 && err.config && !err.config.__isRetryRequest) {
    err.config.__isRetryRequest = true;
    return axios(err.config);
  }
  throw err;
}
axios.interceptors.response.use(undefined, retryFailedRequest);
Axios interceptors and asynchronous login
HAS DEMO
https://stackoverflow.com/questions/35900230/axios-interceptors-and-asynchronous-login

Authentication with Firebase

import firebase from 'firebase'
let config = {
  apiKey: "YOUR_API_KEY",
  authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
  databaseURL: "https://YOUR_PROJECT_ID.firebaseio.com",
  projectId: "YOUR_PROJECT_ID",
  storageBucket: "YOUR_PROJECT_ID.appspot.com",
  messagingSenderId: "YOUR_MESSAGING_SEND_ID"
};
let app;
firebase.initializeApp(firebase_config)
firebase.auth().onAuthStateChanged(function(user) {
  if (!app) {
    app = new Vue({
    })
  }
});

//----------- signup & login -------------- 
firebase.auth().createUserWithEmailAndPassword(email, password)
firebase.auth().signInWithEmailAndPassword(email, password)
//---------------------------------------------------------
https://medium.com/@anas.mammeri/vue-2-firebase-how-to-build-a-vue-app-with-firebase-authentication-system-in-15-minutes-fdce6f289c3c

Authentication

1. console.firebase.google.com
2. Add Project
3. Project Settings
4. Authentication -> Sign-in method -> Email/Password Enabled
5. Authentication -> Users (registered users)

install

https://laravel.com/docs/5.7/homestead



on laravel 8 (5 Apr 2021)


🔖 Chapters:
0:00 Intro
0:48 Install Git
1:45 Generate SSH Key
3:08 Install PuTTY & HeidiSQL
3:37 Install VirtualBox
4:15 Install Vagrant
4:43 Install NFS Plugin
5:32 Pull Homestead from GitHub
6:33 Download VagrantBox (http://bit.ly/3l2HvKi)
7:53 Configure Homestead.yaml
9:54 Boot up VM,Vagrant Up !
11:10 Use SSH Key login without password
12:34 Install Laravel 8.x
14:42 Manage Database without SQL Commands
15:45 Checkout Laravel Welcome Page