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
#!/usr/bin/env php | |
<?php | |
function dateInFormat($timestamp) | |
{ | |
return date('Y-m-d\TH:i:s\Z', $timestamp); | |
} | |
function latLongInFormat($reference) | |
{ | |
return round((float) $reference, 6); |
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 errorAndDie($message) { | |
echo $message . PHP_EOL; | |
die(1); | |
} | |
$url = 'https://api.github.com/user/starred'; | |
do { |
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
FROM php:cli-alpine | |
RUN mkdir /opt/ppd /mnt/ebooks | |
COPY packtPubDownloader.php /opt/ppd/ | |
RUN sed -e "s#saveParentDir = __DIR__;#saveParentDir = '/mnt';#" -i /opt/ppd/packtPubDownloader.php | |
VOLUME /mnt |
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
FROM python:2-alpine3.7 | |
ARG slack_api_token | |
ENV SLACK_API_TOKEN $slack_api_token | |
WORKDIR /local/bot | |
COPY velominati-slack-bot.py ./ | |
RUN apk update && \ |
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
const functionsToOverride = ['overrideMimeType', 'send']; | |
functionsToOverride.forEach(function(fnName) { | |
window.XMLHttpRequest.prototype[fnName] = new Proxy(window.XMLHttpRequest.prototype[fnName], { | |
apply: (target, thisArg, argumentsList) => { | |
console.log(fnName + ' arguments', argumentsList); | |
thisArg[fnName + 'Args'] = [...argumentsList]; | |
const retVal = target.apply(thisArg, argumentsList); | |
console.log(fnName + ' retVal', retVal); | |
return retVal; | |
} |
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 | |
#################################################################################################### | |
# | |
# Setup xBrowserSync API on CentOS | |
# | |
# Copyright (c) 2020, Tom Chapman (https://tom-chapman.uk) | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, are |
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 | |
#################################################################################################### | |
# | |
# Install Linode's LongView on CentOS 8 | |
# | |
# Copyright (c) 2020, Tom Chapman (http://tom-chapman.uk) | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, are |
OlderNewer