Skip to content

Instantly share code, notes, and snippets.

@alanfluff
alanfluff / 0_reuse_code.js
Created August 22, 2017 22:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@alanfluff
alanfluff / H5BP - index.html
Created August 22, 2017 22:59
H5BP - index.html
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
@alanfluff
alanfluff / HTML5 minimal page.html
Created August 23, 2017 20:02
HTML5 minimal page
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
</head>
<body>
<script>
@alanfluff
alanfluff / jq-use-css-in-jq.js
Created September 14, 2017 15:55
jQ Use CSS in jQuery
.css({ 'color': '#fff', 'height': '20px' });
@alanfluff
alanfluff / ready.php
Created September 20, 2017 18:59
Append Subject in outgoing emails - eg date time stamp
<?php
// /site/ready.php
// Email subjects - add a datestamp to email subjects
$forms->addHookBefore('FormBuilderProcessor::emailForm', function($event) {
$processor = $event->object;
$formData = $event->arguments(1); // associative array of form data, if needed
$processor->emailSubject = $processor->emailSubject . " (" . date('Y/m/d H:i:s') . ")";
});