Skip to content

Instantly share code, notes, and snippets.

View Daniel-Griffiths's full-sized avatar
🏠
Working from home

Daniel Griffiths Daniel-Griffiths

🏠
Working from home
View GitHub Profile
<?php
/*
|--------------------------------------------------------------------------
| Broadband Speed Class
|--------------------------------------------------------------------------
|
| This class allows you to parse a CSV file and return the average UK
| broadband speed.
|
| https://data.gov.uk/dataset/broadband-coverage
@Daniel-Griffiths
Daniel-Griffiths / validate.js
Last active July 13, 2016 10:51
Form Validater
/*
* Plugin: Validate v0.1
* Author: Daniel Griffiths
*/
(function($) {
$.fn.validate = function(){
this.each(function(){
var form = this;
@Daniel-Griffiths
Daniel-Griffiths / OpenWithSublimeText.bat
Created June 17, 2016 11:25
adds a right click context menu for sublime in windows
@echo off
SET st3fqfn=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3fqfn%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3fqfn% \"%%1\"" /f
rem add it for directories
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@Daniel-Griffiths
Daniel-Griffiths / Icon.php
Last active August 24, 2016 15:01
PHP Svg Helper Class
<?php
namespace Icon;
/**
* Simple helper class that outputs
* svg icons as text
*/
class Icon
{
@Daniel-Griffiths
Daniel-Griffiths / Router
Created June 19, 2017 20:49
Random small router
<?php
class Router
{
/**
* Route storage.
*
* @var array
*/
protected $routes = [];