Skip to content

Instantly share code, notes, and snippets.

Tom Chapman chappy84

  • UK
Block or report user

Report or block chappy84

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
chappy84 / convert_stravactivity_to_gpx
Last active Dec 27, 2018
Quick and dirty PHP script to convert .stravactivity file to basic gpx xml
View convert_stravactivity_to_gpx
#!/usr/bin/env php
function dateInFormat($timestamp)
return date('Y-m-d\TH:i:s\Z', $timestamp);
function latLongInFormat($reference)
return round((float) $reference, 6);
chappy84 / githubStarred.php
Last active Nov 20, 2016
Github Starred Dates - displays when you starred repos, which seems to have disappeared from GitHub's UI :(
View githubStarred.php
function errorAndDie($message) {
echo $message . PHP_EOL;
$url = '';
do {
chappy84 / packtPubDownloader.php
Last active Jul 10, 2019
Packt Pub Downloader - Quick hacky script to download all your e-books from This may not always work, they may change their api calls etc.
View packtPubDownloader.php
// config values
$saveParentDir = __DIR__; // Parent dir of the ebooks and extras directories
$ebooksDir = 'ebooks'; // path of the ebooks directory relative to $saveParentDir
$extrasDir = 'ebooks' . DS . 'extras'; // path of the extras directory relative to $saveParentDir
$sleepDuration = 4; // Time to delay between page requests / different book downloads
$booksPerListPage = 25; // Book details to try requesting from the PacktPub API. This can be max 25
chappy84 / Dockerfile
Last active Sep 5, 2018
Velominati Slack Bot - Names the rule that someone is quoting in slack (Quickly hacked together script)
View Dockerfile
FROM python:2-alpine3.7
ARG slack_api_token
ENV SLACK_API_TOKEN $slack_api_token
WORKDIR /local/bot
RUN apk update && \
You can’t perform that action at this time.