Skip to content

Instantly share code, notes, and snippets.

View unisys12's full-sized avatar

Phillip Jackson unisys12

View GitHub Profile
@rosswintle
rosswintle / build.php
Last active January 10, 2025 07:28
A VERY simple PHP static HTML generator that does a single-level extend, and includes with variable passing and that's about it.
<?php
/*
* Input: files matching src/pages/*.html
* Output: public/*.html
*
* Pages can extend a template by calling:
*
* extend(string $relativeTemplatePath, array $variables)
*
* at the start and:
@svpernova09
svpernova09 / provision.sh
Last active March 18, 2024 17:53
WSL PHP Development
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
# Update Package List
apt-get update
# Update System Packages
apt-get upgrade -y
@caseywatts
caseywatts / 0-self-publishing.md
Last active May 11, 2025 03:30
Self-Publishing via Markdown
@dhrrgn
dhrrgn / benchmark.php
Last active August 29, 2015 14:00
Handy Benchmarking Function
<?php
function benchmark($name, $iterations, Closure $function)
{
echo "Starting Benchmark: {$name} (".number_format($iterations)." Iterations)\n";
$start = microtime(true);
for ($i = 0; $i < $iterations; $i++) {
$function();
}
$elapsed = microtime(true) - $start;