Skip to content

Instantly share code, notes, and snippets.

View marcusmoore's full-sized avatar

Marcus Moore marcusmoore

View GitHub Profile
@marcusmoore
marcusmoore / Middleware-CSP.php
Created May 2, 2024 19:29 — forked from valorin/Middleware-CSP.php
CSP Middleware - the simple CSP middleware I use across all of my projects.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Vite;
use Illuminate\Support\Str;
/**
* Simple Content Security Policy middleware.
@marcusmoore
marcusmoore / better-git-branch.sh
Created April 29, 2024 17:33 — forked from schacon/better-git-branch.sh
Better Git Branch output
#!/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'
-- github.com/rsefer/hammerspoon-config
--- === SDC Music ===
local obj = {}
obj.__index = obj
obj.name = "SpotifyListener"
local trackNotification
function trackString(artist, track)
@marcusmoore
marcusmoore / opendb-ddev.sh
Created September 24, 2020 02:55 — forked from AlexVanderbist/opendb-ddev.sh
opendb for ddev
opendb () {
unset GREP_OPTIONS
PORT="$(ddev describe | ggrep -Pio "(?<=port=)[0-9]*")"
open mysql://db:db@127.0.0.1:${PORT}/db
}
@marcusmoore
marcusmoore / README.md
Created July 14, 2020 19:12 — forked from MichaelCurrin/README.md
Github GraphQL - Get all file contents in repository

Get Github Files

Get the metadata and contents of all files in a target Github repo using GraphQL

Made for

Github V4 GraphQL API

About the query

@marcusmoore
marcusmoore / gistlog.yml
Created February 7, 2020 01:19
Test GistLog Post
published: true
@marcusmoore
marcusmoore / another.md
Created February 7, 2020 01:15
The Title of Another Test.

Another Test...

@marcusmoore
marcusmoore / gistlog.yml
Last active February 7, 2020 01:19
Testing
published: true
@marcusmoore
marcusmoore / references.md
Created October 31, 2019 11:45
References for BDD and Laravel presented at Laracon AU
## 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