Get the metadata and contents of all files in a target Github repo using GraphQL
Github V4 GraphQL API
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Support\Facades\Vite; | |
use Illuminate\Support\Str; | |
/** | |
* Simple Content Security Policy middleware. |
#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
opendb () { | |
unset GREP_OPTIONS | |
PORT="$(ddev describe | ggrep -Pio "(?<=port=)[0-9]*")" | |
open mysql://db:[email protected]:${PORT}/db | |
} |
## How to install mcrypt in php7.2 | |
## | |
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
## | |
# | |
# Check version php and pecl | |
# | |
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php |
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
# Piece-by-Piece Explanation: | |
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
# the $PROMPT_COMMAND environment variable is executed every time a command is run | |
# see: ss64.com/bash/syntax-prompt.html |
<?php | |
/** | |
* This service provider handles a few custom validation rules. | |
* | |
* PHP version 5.5.9 | |
* @package Snipe-IT | |
* @version v3.0 | |
*/ | |
namespace App\Providers; |
This is an additional paragraph for the excellent Contract Killer https://gist.github.com/malarkey/4031110 | |
Hosting | |
We provide hosting for our own built websites on our preferred hosting provider <hosting provider name>. | |
Based on their SLA we endeavor to have 99.9% uptime on our servers measured annually. | |
There may of course be times when the server will not be available, this can be scheduled or unscheduled. | |
Scheduled downtime is when we know it is going to happen and tell you about it in advance. Scheduled downtime will wherever possible, almost certainly be outside of normal office hours. We’ll do our stuff in the evening or at weekend to minimize impact on your business. |