This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function aqiFromPM($pm) { | |
if($pm >= 350.5) | |
return scale($pm, 500, 401, 500, 350.5); | |
if($pm >= 250.5) | |
return scale($pm, 400, 301, 350.4, 250.5); | |
if($pm >= 150.5) | |
return scale($pm, 300, 201, 250.4, 150.5); | |
if($pm >= 55.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moved to | |
https://github.com/aaronpk/youtube-chat-overlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)" | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" | |
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] | |
then | |
>&2 echo 'ERROR: Invalid installer signature' | |
rm composer-setup.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make previews for a folder of .mov or .mp4 files that MacOS can open. | |
# Normalizes to 480x270 at 30fps and 96kbps audio. | |
current_file=none | |
# 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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Response": { | |
"status": 200, | |
"flightInfo": { | |
"logo": null, | |
"airlineName": null, | |
"airlineCode": "ASA", | |
"airlineCodeIata": null, | |
"tailNumber": "N248AK", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function is_valid_mf2_json($input) { | |
// Input to this function must be an array | |
if(!is_array($input)) | |
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="h-entry"> | |
<a class="p-author h-card" href="http://example.org"> | |
<img src="http://example.org/photo.jpg" alt=""/> | |
Your Name Here</a>: | |
RSVP <span class="p-rsvp">yes</span> | |
to <a href="https://2018.indieweb.org/" class="u-in-reply-to">IndieWeb Summit</a> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="/login.php" method="post"> | |
<input type="url" name="url"> | |
<input type="submit" value="Log In"> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "watchtower worker" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
respawn | |
exec sudo -u ubuntu /usr/bin/php7.1 /web/sites/watchtower/scripts/watchtower.php >> /web/sites/watchtower/scripts/logs/init.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"media-endpoint": "...", | |
"types": { | |
"h-entry": { | |
"properties": ["like-of","bookmark-of","photo","name","content"] | |
}, | |
"h-event": { | |
"properties": [...] | |
}, | |
"h-review": { |
NewerOlder