Skip to content

Instantly share code, notes, and snippets.

beary busy

Tom Witkowski Gummibeer

beary busy
Block or report user

Report or block Gummibeer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Gummibeer / TestCase.php
Last active Jan 14, 2020
phpunit testcase auto setup/teardown traits
View TestCase.php
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use JMac\Testing\Traits\HttpTestAssertions;
use Tests\Utils\CreateUploadedFileFromFilePath;
use Tests\Utils\IsRoutesAware;
use Tests\Utils\ResourceAsserts;
Gummibeer / Car.php
Last active Jan 8, 2020
Car-User-Role permission scratch
View Car.php
class Car extends Model
public function users()
return $this->belongsToMany(User::class, 'car_user_role')
->withPivot('role_id', 'user_id', 'car_id');
Gummibeer / app__Http__Middleware__Localized.php
Created Oct 8, 2019
set all locales if app locale changes
View app__Http__Middleware__Localized.php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
class Localized
Gummibeer / index.html
Last active Sep 10, 2019
Tailwind Admin Dashboard Template
View index.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Tailwind Admin Dashboard</title>
<link href="^1.0/dist/tailwind.min.css" rel="stylesheet">
Gummibeer /
Created Sep 5, 2019 — forked from Vestride/
Encoding video for the web

Encoding Video


Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
Gummibeer / app-Libs-Formatter.php
Created Aug 10, 2019
float & date formatting of model attributes (- are folder separators)
View app-Libs-Formatter.php
namespace App\Libs;
use DateTime;
class Formatter
public static function float(float $float, int $decimals = 2): string
Gummibeer /
Last active May 10, 2019
ffmpeg snippets
function error_exit {
echo "$1" >&2 ## Send message to stderr. Exclude >&2 if you don't want it that way.
exit "${2:-1}" ## Return a code specified by $2 or 1 by default.
if [ $# -eq 0 ]; then
error_exit "No input filepath given"
View injector_7603c867188e487138db3c255dbac9f0.js
function waitForElement(selector) {
return new Promise(function(resolve, reject) {
var runs = 1;
var interval = setInterval(function() {
if (runs >= 30) {
reject(new Error('max runs exceeded'));
var el = document.querySelector(selector);
Gummibeer /
Last active Jul 11, 2019
# EN
git checkout master && git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
# DE
git checkout master && git fetch -p && git branch -vv | awk '/: entfernt]/{print $1}' | xargs git branch -D
You can’t perform that action at this time.