Skip to content

Instantly share code, notes, and snippets.

Aaron Parecki aaronpk

Block or report user

Report or block aaronpk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
php -r "copy('', 'composer-setup.php');"
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
aaronpk /
Created Dec 27, 2018
Make previews for a folder of .mov or .mp4 files that MacOS can open. Normalizes to 480x270 at 30fps and 96kbps audio.
# Make previews for a folder of .mov or .mp4 files that MacOS can open.
# Normalizes to 480x270 at 30fps and 96kbps audio.
# Catch ctrl-c and stop the whole batch, otherwise ctrl-c just stops ffmpeg and the loop continues
trap ctrl_c INT
function ctrl_c() {
View gogo.json
"Response": {
"status": 200,
"flightInfo": {
"logo": null,
"airlineName": null,
"airlineCode": "ASA",
"airlineCodeIata": null,
"tailNumber": "N248AK",
View is_valid_mf2_json.php
function is_valid_mf2_json($input) {
// Input to this function must be an array
return false;
// Keys type and properties are required at a minimum and must be arrays
if(!isset($input['type']) || !is_array($input['type']))
return false;
aaronpk / indieweb-summit-rsvp.html
Last active Jun 2, 2018
Create an HTML page on your website and copy the below HTML into it. Replace the example URL and photo, and add your name. Then visit and paste the link to your page!
View indieweb-summit-rsvp.html
<div class="h-entry">
<a class="p-author h-card" href="">
<img src="" alt=""/>
Your Name Here</a>:
RSVP <span class="p-rsvp">yes</span>
to <a href="" class="u-in-reply-to">IndieWeb Summit</a>
aaronpk / index.php
Last active Feb 7, 2018
IndieAuth Client Quickstart
View index.php
<form action="/login.php" method="post">
<input type="url" name="url">
<input type="submit" value="Log In">
View watchtower.conf
description "watchtower worker"
start on runlevel [2345]
stop on runlevel [016]
exec sudo -u ubuntu /usr/bin/php7.1 /web/sites/watchtower/scripts/watchtower.php >> /web/sites/watchtower/scripts/logs/init.log 2>&1
View mp-config.json
"media-endpoint": "...",
"types": {
"h-entry": {
"properties": ["like-of","bookmark-of","photo","name","content"]
"h-event": {
"properties": [...]
"h-review": {
View media-endpoint.php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Authorization');
if(isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/plain') !== false) {
$format = 'text';
} else {
header('Content-Type: application/json');
$format = 'json';
You can’t perform that action at this time.