Skip to content

Instantly share code, notes, and snippets.

View colinodell's full-sized avatar

Colin O'Dell colinodell

View GitHub Profile
@colinodell
colinodell / packagist-counter.ino
Created January 27, 2020 22:49
Packagist download count - firmware
// This #include statement was automatically added by the Particle IDE.
#include "LedControl-MAX7219-MAX7221/LedControl-MAX7219-MAX7221.h"
#include <math.h>
LedControl lc=LedControl(D6,D4,D5,1);
int count = 0;
int lastCount = 0;
int downloadsPerInterval = 1;
@colinodell
colinodell / BeepExtension.php
Created September 14, 2020 17:04
Make PHPUnit beep at you any time a test fails
<?php declare(strict_types=1);
namespace Vendor;
use PHPUnit\Runner\AfterTestErrorHook;
final class BeepExtension implements AfterTestErrorHook
{
public function executeAfterTestError(string $test, string $message, float $time): void
{
@colinodell
colinodell / test.php
Created October 2, 2021 21:00
Copypaste and run this ;-)
<?php
$you can use = 'spaces';
var_dump($you can use);