Skip to content

Instantly share code, notes, and snippets.

View CerealKiller97's full-sized avatar
🎯
Focusing

Stefan Bogdanović CerealKiller97

🎯
Focusing
View GitHub Profile
@CerealKiller97
CerealKiller97 / laravel-deploy.sh
Last active May 11, 2021 13:47
Laravel deployment script
#!/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
@CerealKiller97
CerealKiller97 / manjaro-setup.md
Last active October 24, 2020 11:06
Manjaro Setup Script
@CerealKiller97
CerealKiller97 / runme.local.sh
Last active May 17, 2020 17:11
Laravel Local Setup
#!/bin/bash
echo "Copying .env file..."
if [ ! -f ".env" ]; then
scp .env.example .env
fi
echo "Composer install..."
composer install
@CerealKiller97
CerealKiller97 / jwt.js
Created October 30, 2019 15:23
JWT library
/**
* @description Checks if JWT Token has expired
* @param {string} token
*
* @return {boolean}
*/
const isTokenExpired = token => {
/** @type {string[]} */
const parts = token.split(".");
/** @type {number} */
@CerealKiller97
CerealKiller97 / cool-terminals.md
Last active February 1, 2020 11:03
Cool terminals