Skip to content

Instantly share code, notes, and snippets.

View ReeceM's full-sized avatar
:shipit:
Busy

Reece May ReeceM

:shipit:
Busy
View GitHub Profile
@ReeceM
ReeceM / package.json
Last active June 16, 2021 14:57
Working storybook and sm-ui alpha versions
"dependencies": {
"essential-slices": "^1.0.4",
"next": "10.2.0",
"next-slicezone": "^0.0.15",
"next-transpile-modules": "^7.0.0",
"prismic-javascript": "^3.0.2",
"prismic-reactjs": "^1.3.3",
"react": "17.0.2",
"react-dom": "17.0.2",
"theme-ui": "^0.8.4"
@ReeceM
ReeceM / body-codes.csv
Created April 7, 2021 19:54 — forked from billinghamj/body-codes.csv
DVLA V355 - code mappings, normalized & cleaned, in CSV format
Code Category Subcategory Description
1 Cars & Light 4X4 Utilities Cars 2-Door Saloon
2 Cars & Light 4X4 Utilities Cars 4-Door Saloon
3 Cars & Light 4X4 Utilities Cars Saloon (for information only, no longer used)
4 Cars & Light 4X4 Utilities Cars Convertible
5 Cars & Light 4X4 Utilities Cars Coupe
6 Cars & Light 4X4 Utilities Cars Estate
11 Cars & Light 4X4 Utilities Cars Hearse
12 Cars & Light 4X4 Utilities Cars Limousine
13 Cars & Light 4X4 Utilities Cars 3-Door Hatchback
@ReeceM
ReeceM / README.md
Last active August 3, 2021 19:50
Package Pages Badges

Pacakge Pages Badges

To add a badge to your page in the bottom corner, you can add the following css to your style sheets or your docs main page.

.pkg-badge {
  position: fixed; 
  bottom: 0px; 
 left: 0px; 
@ReeceM
ReeceM / Collapse.vue
Last active June 8, 2020 10:10
Tailwindcss/ui collapsing sidebar links
<template>
<div>
<a
href="#"
@click="open = !open"
:class="open ? 'bg-gray-200' : ''"
class="mt-3 -mx-3 px-3 py-1 flex items-center justify-between text-sm font-medium hover:bg-gray-300 rounded-lg"
>
<span class="inline-flex w-full hover:text-gray-900 text-gray-500">
<slot name="icon">
@ReeceM
ReeceM / README.md
Created May 26, 2020 09:40
JS replacer for simple templating.

Example of templating script.

This is just a simple way to use a single level data object and replace the values in a template of the innerHTML of <template> element.

It uses the keys from the object of data to search the template string and replace the matching value.

Its very simple and for the sake of testing ideas and being interesting.

It is obviously susceptable to XSS, so it would be best to use dompurify or something to clean the data if you are getting the object from any user input values or unknown sources.

<?php
namespace Tests;
use Mail;
use Swift_Message;
use Swift_Events_EventListener;
trait MailTracking
{
/**
* Delivered emails.
@ReeceM
ReeceM / flash.blade.php
Last active May 5, 2019 08:40
Simple and quick way to show flash messages using bulmaio and laravel
// put this as a partial in you app.blade.php
@if(session('global.flash'))
<section style="position: fixed; right: 1rem; top: 3.2rem; z-index: 999">
<div class="tile is-ancestor" >
<div class="tile is-parent is-vertical">
@foreach(session('global.flash') as $key => $notice)
<div class="tile is-child">
<div class="notification is-{{$key}} animated fadeInDown" onclick="this.remove()">
<span class="delete"></span>