Skip to content

Instantly share code, notes, and snippets.

View sanscheese's full-sized avatar
🅱️

Ben Sheedy sanscheese

🅱️
View GitHub Profile
@sanscheese
sanscheese / bookmarklet.js
Created March 6, 2024 12:00
Bookmarklet to show commit times on GitHub
javascript:(function () { document.querySelectorAll("relative-time").forEach(function (el) { var p = el.parentNode; var t = el.title; var s = document.createElement("span"); s.innerHTML = t; p.removeChild(el); p.appendChild(s); }); })();
@sanscheese
sanscheese / pricing.html
Last active June 24, 2022 16:41
Pricing HTML
<html>
<head>
<link href="/css/output.css" rel="stylesheet">
</head>
<body>
<div class="bg-green-700 text-white p-5">
<h1>Pricing</h1>
<a href="/">< Back home</a>
</div>
@sanscheese
sanscheese / pricing.ts
Created June 24, 2022 16:00
Edge function - Dynamic pricing
import { Context } from "netlify:edge"
export default async (request: Request, context: Context) => {
const url = new URL(request.url)
context.log(`Updating price ${url}`)
// Get the page content
const response = await context.next()
const page = await response.text()
@sanscheese
sanscheese / Module.php
Created April 11, 2020 23:16 — forked from brandonkelly/Module.php
Custom Preview Target for Craft 3.2
<?php
// -- modules/Module.php --
namespace modules;
use Craft;
use craft\base\Element;
use craft\elements\Entry;
use craft\events\RegisterPreviewTargetsEvent;
@sanscheese
sanscheese / Three Wise Monkeys.md
Created July 20, 2018 08:53
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@sanscheese
sanscheese / GDPR.md
Created July 20, 2018 08:52
(Data) Protection Racket
@sanscheese
sanscheese / Contract Killer 3.md
Created March 27, 2018 04:28
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post