Copyright (C) 2020 Dusan Mitrovic dusan@dusanmitrovic.xyz
Licensed under the terms of the CC BY-SA 4.0
Valet Linux
https://cpriego.github.io/valet-linux/| package recaptcha | |
| var ErrResponseEmpty = errors.New("response is an empty string") | |
| const siteVerifyURL = "https://www.google.com/recaptcha/api/siteverify" | |
| type ( | |
| V3Response struct { | |
| ChallengeTS time.Time `json:"challenge_ts"` | |
| Hostname string `json:"hostname"` |
| #!/usr/bin/bash | |
| # Turn on maintenance mode | |
| php artisan down || true | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin master | |
| # Install/update composer dependecies | |
| composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev |
Valet Linux
https://cpriego.github.io/valet-linux/| #!/bin/bash | |
| echo "Copying .env file..." | |
| if [ ! -f ".env" ]; then | |
| scp .env.example .env | |
| fi | |
| echo "Composer install..." | |
| composer install |
| /** | |
| * @description Checks if JWT Token has expired | |
| * @param {string} token | |
| * | |
| * @return {boolean} | |
| */ | |
| const isTokenExpired = token => { | |
| /** @type {string[]} */ | |
| const parts = token.split("."); | |
| /** @type {number} */ |