Skip to content

Instantly share code, notes, and snippets.

View ramsey's full-sized avatar

Ben Ramsey ramsey

View GitHub Profile
@ramsey
ramsey / foo.php
Created October 16, 2017 21:11
Segfault when running built-in PHP web server
<?php
class Foo
{
public function execute($log)
{
file_put_contents($log, "this is a log\n", FILE_APPEND);
}
}
(new Foo())->execute('./mylog.txt');
@ramsey
ramsey / r53export.sh
Last active October 19, 2023 17:46
Queries AWS Route53 for a zone name and outputs a zone file of its records
#!/bin/bash
#
# Queries AWS Route53 for a zone name and outputs a zone file of its records
#
# Usage:
#
# r53export example.com[ profile]
#
# By default, uses $AWS_PROFILE environment variable, if set.
#
@ramsey
ramsey / openapi.yaml
Last active September 26, 2019 17:57
OpenDISCO OpenAPI Document WIP
openapi: 3.0.2
info:
title: DISCO Server
contact:
url: http://www.open-disco.org
version: 'v1.0.0'
servers:
- url: http://rwmbook-registry.herokuapp.com

Place theme files in ~/.k9s/ and create a symlink to the theme you wish to use as the current skin:

ln -s ~/.k9s/theme-to-use.yml ~/.k9s/skin.yml
@ramsey
ramsey / app.php
Created August 11, 2020 21:43
Simple example showing how multi-line responses work with symfony/console.
<?php
declare(strict_types=1);
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
@ramsey
ramsey / Dockerfile
Last active September 28, 2020 22:52
benramsey/pandoc-latex
FROM pandoc/latex:latest
RUN apk --no-cache add \
python3 \
python3-dev \
py3-psutil \
&& pip3 install --upgrade pip
RUN pip3 install \
pandocfilters \
@ramsey
ramsey / fn.slugify.sql
Created May 26, 2021 22:09 — forked from wesleymacente/fn.slugify.sql
slugify function for MySQL
/*
The MIT License (MIT)
Copyright (c) 2014 jose reis<jose.reis@artbit.pt>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@ramsey
ramsey / php-8.1.0.alpha1.manifest
Created June 10, 2021 15:14
PHP 8.1.0 Alpha 1 Manifest
php-8.1.0alpha1.tar.bz2
SHA256 hash:
38fb766220c4e18da24db404812d343d34bb16256e621c629aafa7395b5e72f6
PGP signature:
- -----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE8faSI4+8FmblpczUGZ+d/vb/uv0FAmC/m44ACgkQGZ+d/vb/
uv0SSxAAteA2Yy690Y1bp+TrsZ/zLKOxLb043zfsJp+Y5YyT2Gj3b9Esuvrh10JN
kqLM2ZEg2jpjCIhknimhOsgqiO2SikqkeHI3h4zo5BReOwpjHeaTv2ty6cH+EgPl
vA37pUXRIpcPlCDPxoNqEHlbsAD2paZB35HcrH57dYoRBUVGPbApwVxCVmNX+It+
php-8.1.0alpha3.tar.bz2
SHA256 hash: 9317bb70d09c7a24643e7a6813a9b6b95bbd70c5776d2dd8c498abe5c15bfbbd
PGP signature:
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEObZBND2MEEsrFG3D+cOdwLlphUQFAmDkd2cACgkQ+cOdwLlp
hUSzcw//Z9J389qL0CA5LXQxRBXyajSfu7aD6LMVsHHMGe/RVxJUsmi3OEGtZHB8
9ENCMaEZYGh1MhAGG9N8eunD85QZwvoX1SuvSgsmNl0QTnoL6d5YzVFOWIHdvbxL
Nw/+HcBVvCZ36j4mz7+5F58GeBpP1Ctzp8ebGEyXg+dK/3lL/YRn0/63btjTOjmi
iqpF6SQo1qMwVISiq5s5HMScTY9vZMNFzB4d9sL9Feh0E9qGA0teD7mtt0r6EmHN
php-8.1.0beta1.tar.bz2
SHA256 hash: 3bd4c7251a6e32931f7029a569ed2e444f163dc7ed3c458119a3af9cea41f588
PGP signature:
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEObZBND2MEEsrFG3D+cOdwLlphUQFAmD2+AYACgkQ+cOdwLlp
hURb1A/8DPJQPUGfhm5RLTyhFjMkCzOAqCmsc1lkSlNEYhD1xtoBsv2Z5ddq2GYC
hMR42ErnSTker6OJ+ELe5dHi3ZdGgpNeyZ+9gcAMfoHp/hC5E+t1f+Q+8uXAUGUf
gDxs/vq7B/JAq5na75Ah8TUmdD2+zOqwijaVg0X8vhRqQG+rQdgxFXhxqa4V0O5O
K5ANDy0ao9jISCARiyvv25dCV38NPbmxvpjirz1Ne/pJt/7WEydC0gs/X6qJmddw