Skip to content

Instantly share code, notes, and snippets.

View mxmtsk's full-sized avatar
🎯
Focusing

Max Mitschke mxmtsk

🎯
Focusing
View GitHub Profile
@mxmtsk
mxmtsk / BaseLayout.tsx
Last active October 28, 2023 08:02
React implementation of Vue3 Adapater for https://github.com/lepikhinb/momentum-modal
/**
* Unfortunately I didn't find a way to add it directly to createInertiaApp so
* currently I'm placing it in my BaseLayout which is called on any route anyway
*/
import React from 'react';
import { ModalProvider } from '../components/momentum-modal/ModalContext';
const BaseLayout: React.FC = ({ children }) => {
/* Wrap your children with the provider */
return <ModalProvider resolve={(name) => import(`../pages/${name}`)}>{children}</ModalProvider>;
@mxmtsk
mxmtsk / MultipartController.php
Last active February 16, 2024 03:13
Laravel controller for handling AWS S3 Multipart uploads with Uppy.io uploader. Replicates the API of the node server so you only have to specify `companionUrl` in the Uppy Configuration without specific the custom methods.
<?php
namespace App\Http\Controllers;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Config;
@mxmtsk
mxmtsk / tweetcount.js
Last active December 15, 2017 19:53
Simple Tampermonkey Script that will show the tweet character count on Twitter!
// ==UserScript==
// @name Show Twitter Count
// @namespace mxmtsk.twittercount
// @version 0.1
// @description Show good old twitter count instead of the donut
// @author mxmtsk
// @match https://twitter.com/*
// @grant none
// @run-at document-idle
// ==/UserScript==