Skip to content

Instantly share code, notes, and snippets.

View owenvoke's full-sized avatar

Owen Voke owenvoke

View GitHub Profile
@owenvoke
owenvoke / README.md
Last active March 9, 2022 17:19
Non-Production Scoop / Shovel Manifests

Non-Production Scoop / Shovel Manifests

A Gist to store my non-production Scoop and Shovel manifests before migrating them to my main bucket.

This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreiefz3tenlodztyymmn6fvb54yfctq732e4d3ishxqpbxjrzil5ob4 ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@owenvoke
owenvoke / bs-meta-parser
Last active August 24, 2021 10:11
A simple script to parse Beat Saber metadata
#!/usr/bin/env php
<?php
/*
|--------------------------------------------------------------------------
| Beat Saber Metadata Parser
|--------------------------------------------------------------------------
|
| This application will parse the metadata from downloaded compressed
| Beat Saber song files.
{
"basics": {
"name": "Owen Voke",
"label": "Web Developer",
"picture": "https://i.imgur.com/BDMrEXd.jpg",
"email": "owen@voke.dev",
"website": "https://voke.dev",
"summary": "I'm a full stack web developer, primarily working with PHP and JavaScript in the open source community.",
"location": {
"city": "Bristol",
@owenvoke
owenvoke / readDuration.php
Created May 5, 2021 10:17
A string macro for the duration to read text.
<?php
// From Marcel Pociot's tweet
// See: https://twitter.com/marcelpociot/status/1389881758267625473
Str::macro('readDuration', function (... $text) {
$totalWords = str_word_count(implode(' ', $text));
$minutesToRead = round($totalWords / 200);
return (int) max(1, $minutesToRead);
@owenvoke
owenvoke / DragonCommand.php
Created September 30, 2020 15:56
Display the Laravel Dragon ASCII art
<?php
namespace App\Commands;
use Illuminate\Console\Command;
class DragonCommand extends Command
{
/** {@inheritdoc} */
protected $signature = 'dragon';
@owenvoke
owenvoke / Dockerfile
Created September 30, 2020 12:55
A Dockerfile for Laravel Zero PHAR distribution
# Set the required PHP version
FROM php:7.3-cli
# Set the name of your application binary
ARG APP_NAME=application
# Update global packages for the container
RUN apt-get update
# Install any required PHP extensions
@owenvoke
owenvoke / Tall Stack Pest Syntax.md
Last active June 10, 2020 16:24
A patch for updating the TALL stack preset tests to use Pest syntax.

Tall Stack Pest Syntax

This is a patch for updating the Laravel TALL stack preset tests to use the Pest syntax.

Usage

curl https://gist.githubusercontent.com/owenvoke/b9e09290fe55737be8168c9d961a772f/raw/tall-stack-pest-syntax-changes.diff | git apply
@owenvoke
owenvoke / LaravelZeroTinkerwellDriver.php
Created February 28, 2020 09:55
A Tinkerwell driver for Laravel Zero.
<?php
use LaravelZero\Framework\Application;
use Tinkerwell\ContextMenu\Label;
use Tinkerwell\ContextMenu\Submenu;
use Tinkerwell\ContextMenu\SetCode;
use Tinkerwell\ContextMenu\OpenURL;
class LaravelZeroTinkerwellDriver extends TinkerwellDriver
{
#
# Starship Zplug
# https://github.com/starship/starship
#
# Add the following to your ".zshrc":
# zplug "pxgamer/9070c3dbd6483d69a4b376f9dbcb9e62", use:starship.zsh, from:gist, as:theme
export STARSHIP_VERSION='0.26.4'
STARSHIP_LATEST_RELEASE=https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz