Skip to content

Instantly share code, notes, and snippets.

View carbontwelve's full-sized avatar

Simon Dann carbontwelve

View GitHub Profile
carbontwelve /
Created December 14, 2022 13:01 — forked from dsample/
ASCII art diagrams

ASCI art characters for creating diagrams


Single line

  • ASCII code 191 = ┐ ( Box drawing character single line upper right corner )
  • ASCII code 192 = └ ( Box drawing character single line lower left corner )
  • ASCII code 193 = ┴ ( Box drawing character single line horizontal and up )
  • ASCII code 194 = ┬ ( Box drawing character single line horizontal down )
View spacemines.php
* PHP Space Mines Simulation
* Based upon Space Mines from Usborne Computer Space Games
* @see
function lerp($a, $b, $t): float
carbontwelve / alice_in_wonderland.txt
Created February 1, 2022 14:11
Large Text Sources
View alice_in_wonderland.txt
Alice's Adventures in Wonderland
Lewis Carroll
carbontwelve / perlin.php
Created January 24, 2022 21:24 — forked from dazld/perlin.php
PHP Perlin Noise Class
View perlin.php
//This is a port of Ken Perlin's "Improved Noise"
// Originally from
// but the site appears to be down, so here is a mirror of it
class Perlin {
var $p, $permutation, $seed;
carbontwelve / fill_screen.c
Last active May 10, 2021 21:34
DOS C Programming
View fill_screen.c
#include <conio.h>
This program fills the screen with an extended ASCII character 129 (octal 201). As
you press any key the foreground colour is incremented through all 16 foreground
colours. This was written to test an issue I was having with the Watcom graph.h
library to see if the issue was with my environment (DOS Box) or my program. The
problem was extended ASCII characters always showing as a colour one less than the
background colour.
carbontwelve / AblyBatchBroadcaster.php
Created March 24, 2021 13:01
Example of using Ably's Batch mode with Laravel
View AblyBatchBroadcaster.php
namespace App\Broadcasting;
use Illuminate\Broadcasting\Broadcasters\AblyBroadcaster;
class AblyBatchBroadcaster extends AblyBroadcaster
private $batch = [];
carbontwelve / atatus.js
Created July 9, 2020 13:14
Atatus plugin for nuxt.js
View atatus.js
import * as atatus from 'atatus-spa';
import Vue from 'vue';
* classifyRE, classify and formatComponentName are taken from
* node_modules/vue-template-compiler/build.js due to them
* seemingly being made private methods in Vue2.
const classifyRE = /(?:^|[-_])(\w)/g;
const classify = function(str) {
View carbontwleve.css
background: #fff3e1;
color: #5a5a5a;
font-size: 20px;
body h1 a, body header h2 a {
color: #5a5a5a;
carbontwelve / wordsmith.css
Last active December 17, 2019 18:05 inspired css for writefreely
View wordsmith.css
body {
background-color: #efefef;
/* Blog header on index and post pages */
#blog-title a {
color: #fff;
background-color: #7a629d;
padding: 0.5em;
display: inline-block;
carbontwelve / RouteListCommand.php
Created November 9, 2018 12:25
Command that overloads the laravel route:list and adds tenant aware capabilities.
View RouteListCommand.php
namespace App\Console\Commands;
use Illuminate\Foundation\Console\RouteListCommand as BaseRouteListCommand;
use Illuminate\Routing\RouteCollection;
use Illuminate\Routing\UrlGenerator;
use Symfony\Component\Console\Input\InputOption;
class RouteListCommand extends BaseRouteListCommand