Skip to content

Instantly share code, notes, and snippets.

David Piesse davidpiesse

  • David Piesse
  • UK
Block or report user

Report or block davidpiesse

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
davidpiesse / index.js
Created Aug 5, 2019
Brand Colour Tailwind Plugin
View index.js
let brands = {
"500px": {
"title": "500px",
"slug": "500px",
"colors": ["0099e5", "ff4c4c", "34bf49"]
"about-me": {
"title": "",
"slug": "about-me",
"colors": ["00a98f"]
davidpiesse / example.js
Created Jul 8, 2018
A auto loader that allows for loading modules quickly with an await function and then call anywhere else (Allows you to get out the the UMD function)
View example.js
import esri from '../moduleLoader'
async loaded(){
await esri.loadModules([
davidpiesse / Schedulable.php
Last active Feb 5, 2020
Laravel Custom Class/Model Scheduling
View Schedulable.php
//Don't forget to change the namespace!
namespace App\Traits;
use Cron\CronExpression;
use Illuminate\Support\Carbon;
use Illuminate\Console\Scheduling\ManagesFrequencies;
trait Schedulable{
davidpiesse / tailwind_md_all_colours.js
Last active Jan 12, 2020
A colour set for Tailwind CSS that include all Material Design Colours, shades, accents and contrast colours
View tailwind_md_all_colours.js
//All colours are generated from Material Design Docs
//Colours have a base, a set of shades (50-900) accent colours
//In addition a companion set of contrast colours are included for colouring text / icons
// Example usage
// class="w-full bg-red-600 text-red-600-constrast"
davidpiesse / tailwind_md_colours.js
Last active Feb 15, 2018
Replace the default (still great) colors from Tailwind to those from Material Design maintaining the Tailwind naming convention
View tailwind_md_colours.js
//For mapping the 100-900 colors we have mapped as follows:
View example.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Starter Template for Tailwind CSS</title>
<!-- Tailwind CSS Preflight CSS-->
davidpiesse /
Last active Jan 31, 2018
Earthquake Stream Connection - Pusher
davidpiesse / gist:572d4aa272fdbaccfd49423b3cf699fc
Created May 25, 2017
Bash script for adding common packages when building a new laravel project
View gist:572d4aa272fdbaccfd49423b3cf699fc
//Asks a bunch of questions about potential common packages that you may want to add
laravel new test-project
//It runs
//Asks questions
There are 27 potential packages you may want to add to your composer file. Select y/n for all of the following.
Once complete composer will install all of these packages with the latest version if not defined in the list of packages
davidpiesse / vue-switch-style
Created Mar 1, 2017
VueJS Switch Custom Style - SASS to CSS conversion
View vue-switch-style
.vue-switcher-theme--custom.vue-switcher-color--green div {
background-color: #C8E6C9;
.vue-switcher-theme--custom.vue-switcher-color--green div:after {
background-color: #43A047;
.vue-switcher-theme--custom.vue-switcher-color--green.vue-switcher--unchecked div {
background-color: #E0E0E0;
.vue-switcher-theme--custom.vue-switcher-color--green.vue-switcher--unchecked div:after {
davidpiesse / Foreach-refactor.php
Created Jul 29, 2016
A refactoring challenge for Adam Wathan at Laracon 2016
View Foreach-refactor.php
//this function returns entrymessage objects only if the entrymessage is a mesaage, and the internal message object isText.
//From Facebook messenger api
//Got parts refractories but couldn't work out how to return a collection of valid entrymessages with the double foreach.
//Tried lots of combos of each/map/ and filter.
public function textMessages()
$result = [];
foreach ($this->entries as $entry) {
foreach ($entry->messages as $entryMessage) {
You can’t perform that action at this time.