Skip to content

Instantly share code, notes, and snippets.

View chapterjason's full-sized avatar
🕳️
<- Insert Bug

chapterjason chapterjason

🕳️
<- Insert Bug
View GitHub Profile
@chapterjason
chapterjason / plesk-deploy.sh
Created October 31, 2023 11:16
Zero Deployment Time Script
#!/usr/bin/env bash
set -euo pipefail
# Base
USER_DIRECTORY="$(cd ~ && pwd)"
ROOT_DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
LOCK_FILE="${ROOT_DIRECTORY}/.deploy.lock"
NOW=$(date -u +"%Y%m%d%H%M%S")
LOG_FILE="${ROOT_DIRECTORY}/.deploy.${NOW}.log"
@chapterjason
chapterjason / S3FileStream.php
Created June 21, 2023 10:29 — forked from progress44/S3FileStream.php
Laravel response class to handle S3 file stream
<?php
namespace App\Http\Responses;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class S3FileStream
{
/**
<?php
$combinations = [
[-40, -50],
[-40, 0],
[-40, 50],
[-40, 100],
[-40, 60.8],
[-40, -60.8],
[0, -50],

Initial release

Update master branch

git checkout master
git pull --rebase origin master
@chapterjason
chapterjason / auto-switch.js
Last active June 27, 2019 19:25
Tampermonkey youtube script - automatically switch to videos tab
// ==UserScript==
// @name Automatic channel tab switch
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Switches automatically to the videos tab if a channel or user page is requested
// @author Jason Schilling <jason.schilling@sourecode.de>
// @updateURL https://gist.github.com/chapterjason/63d2273f3d02a4ad40fd789101f8991d/raw/auto-switch.js
// @downloadURL https://gist.github.com/chapterjason/63d2273f3d02a4ad40fd789101f8991d/raw/auto-switch.js
// @match https://www.youtube.com/*
// @run-at document-end
@chapterjason
chapterjason / DynamicMethod.php
Created November 7, 2018 14:11
Dynamic PHP Methods
<?php
/**
* Copyright Jason Schilling
**/
interface DynamicMethodsAwareInterface
{
}
trait DynamicMethodsAwareTrait
@chapterjason
chapterjason / make.bat
Last active September 14, 2017 07:05
Symfony Makefile ported to windows as batch
@ECHO off
SETLOCAL EnableDelayedExpansion
FOR /f "delims=" %%x IN (.env) DO (
SET "VAR=%%x"
IF NOT "!VAR:~0,1!" == "#" (
ECHO setting %%x
SET "%%x"
)
@chapterjason
chapterjason / BEM
Last active May 4, 2016 11:49
BEM Mixin
/**
* ==============================
* Configuration
* ==============================
**/
$elementSeparator: '__';
$modifierSeparator: '--';
$statePrefix: '.is-';
/**