Skip to content

Instantly share code, notes, and snippets.

View mikeschinkel's full-sized avatar

Mike Schinkel mikeschinkel

View GitHub Profile
@mikeschinkel
mikeschinkel / resume.json
Last active February 11, 2025 12:41
Mike Schinkel's resume — Last updated 2025-02-11 — Also see github.com/mikeschinkel/resume for more recent updates
{
"meta": {
"theme": "kendall"
},
"basics": {
"name": "Mike Schinkel",
"label": "Senior Software Engineer specializing in Go, Kubernetes, and CI/CD",
"location": {
"postalCode": "GA 30308",
"city": "Atlanta",
package main
import (
"encoding/json"
"errors"
"fmt"
"io"
"mime"
"net/http"
"net/url"
@mikeschinkel
mikeschinkel / main.go
Last active February 2, 2025 14:27
Hypothetical example illustrating Golang issue #70257 along with goto error handling
package main
import (
"encoding/json"
"errors"
"fmt"
"io"
"mime"
"net/http"
"net/url"
@mikeschinkel
mikeschinkel / main.go
Last active January 29, 2025 05:40
Example use-case for github.com/micromdm/plist where `UnmarshalPlist()` needs access to `pval`
package main
import (
"bytes"
"fmt"
"os"
"github.com/micromdm/plist"
)
@mikeschinkel
mikeschinkel / Dockerfile
Last active July 26, 2024 01:21
Statamic — Dockerfile and compose; FILES SHOWN DO NOT WORK, see the _README.md for the working solution.
# Use an official PHP image with FPM
FROM php:8.3-fpm
LABEL authors="gearbox.works"
ENV LARAVEL_STORAGE_PATH=/var/statamic/storage
# PHP Extension Installer
COPY --from=mlocati/php-extension-installer \
/usr/bin/install-php-extensions \
@mikeschinkel
mikeschinkel / Statics\MemCache.php
Created July 9, 2024 01:15
PHP Classes Statics\MemStream and Statics\MemCache (NOT memcached-related.)
<?php
declare(strict_types=1);
namespace Statics;
/**
* Class MemCache
*
* Handles static memory caching — NOT TO BE CONFUSED with `memcached`.
*/
@mikeschinkel
mikeschinkel / .README.md
Last active August 23, 2024 11:51
Go json.Unmarshal() vs. PHP json_decode() performance a large JSON file

GoLang json.Unmarshal() vs. PHP json_decode()

To evaluate if Go json.Unmarshal() is faster or slower than PHP json_decode() for arbitrary JSON I decided to run a quick benchmark on my 2015 MacBook Pro (Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz).

I used this ~25Mb JSON file and ran the attached two program under Go 1.22 and PHP 8.3.2, respectively.

My benchmarks were very unscientific but I was just looking for orders of magnitude.

Here are the results from three different runs, each:

Go (avg 30.82)

@mikeschinkel
mikeschinkel / _readme.md
Last active February 16, 2024 01:10
How to transpose a table in Sqlite
@mikeschinkel
mikeschinkel / .readme.md
Last active October 1, 2024 08:01
Script to create and remove a RAM disk on macOS

How to Create a RAM Disk on macOS

This script creates a RAM disk either in a ./data subdirectory off the root of the current Git repo, or a ./data subdirectory of the current directory if not in a Git repo.

To Attach a RAM Disk

./ramdisk-macos.sh 

To Detatch the RAM disk

package vermock
import (
"testing"
)
//goland:noinspection GoSnakeCaseUsage
type MockGetter interface {
Get_Vermock() *Mock
}