Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Cavens BenCavens

View GitHub Profile
@BenCavens
BenCavens / DatabaseQueueMonitorCommand.php
Created Aug 2, 2021
Laravel queue monitoring on shared hosting
View DatabaseQueueMonitorCommand.php
<?php
namespace App\Queue;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class DatabaseQueueMonitorCommand extends Command
{
@BenCavens
BenCavens / random-code-generator.sql
Last active Dec 12, 2019
Small mysql loop for generating unique alphanumerical codes
View random-code-generator.sql
DROP PROCEDURE IF EXISTS generator;
DELIMITER //
CREATE PROCEDURE generator(total INTEGER UNSIGNED, max_chars INTEGER UNSIGNED)
BEGIN
SET @currentLoop = 0;
REPEAT
View sass viewport mixins
// Viewport sizes
$tablet-min-width: 768px;
$desktop-min-width: 1024px;
@mixin phone{
@media (max-width: #{$tablet-min-width - 1px}){
@content;
}
}