Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

barryosull / dnd-prototype.html
Last active October 15, 2022 00:31
DND prototype I made for my first DM session
<title>Dnd - Lost mines of Phandelver</title>
<style type="text/css">
body {
margin: 0 10px;
font-family: Arial;
background-color: darkgreen;
barryosull / index.php
Created February 28, 2020 10:32
PHPUnit Code Coverage Report of Web App
How to run a code coverage report on a web page:
Simply put this code after the vendor require and before the rest of the calling logic.
(Assumes you have PHPUnit installed)
require_once __DIR__ . "/../vendor/autoload.php";
barryosull / Stripe SCA: Charging Saved Card JS.js
Created July 9, 2019 12:30
There is a bug in the Stripe documentation. It gives an incorrect code example for trying to reuse an existing card. Here's the fix.
* There is a bug in the Stripe SCA documentation for reusing saved cards.
* It gives an incorrect code sample for trying to reuse an existing card via Card Elements.
* The offending sample:
/** It says to do this **/
cardButton.addEventListener('click', function(ev) {
barryosull / typed-php-arrays.php
Created June 11, 2018 19:30
Typed PHP arrays via variadic function args
class TestObject
function onlyAcceptArrayOfTestObjects(TestObject ...$objects)
echo "Got ".count($objects)." TestObjects\n";