Skip to content

Instantly share code, notes, and snippets.


Chris Hardie ChrisHardie

View GitHub Profile
ChrisHardie / instagram-to-rss.php
Created Oct 14, 2019
Sample PHP script to scrape an Instagram public profile and generate an RSS feed
View instagram-to-rss.php
$target_accounts = array(
foreach ( $target_accounts as $target_user ) {
$target_user = urlencode( $target_user );
ChrisHardie / check-for-results.php
Created Nov 5, 2019
A PHP script to check for results in the Wayne County, Indiana 2019 Mayoral Election
View check-for-results.php
require __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/config.php';
$output_messages = array();
$wayneco_results_html = file_get_contents( WAYNECO_RESULTS_URL );
$state_results_html = file_get_contents( STATE_RESULTS_URL );
ChrisHardie / class-api-routes.php
Created Feb 18, 2020
Flickr-to-WordPress: a class defining a REST API endpoint to determine the local WordPress equivalent of an imported Flickr photo
View class-api-routes.php
* Class JCHPhotos_Plugin_API_Routes
* Handles API endpoints for looking up Flickr-to-WordPres translation stuff.
class JCHPhotos_Plugin_API_Routes {
ChrisHardie / jch-flickr-fixer.php
Created Feb 18, 2020
Flickr-to-WordPress: a plugin to use a WordPress powered API to find/replace Flickr references in another WordPress site
View jch-flickr-fixer.php
* Plugin Name: Flickr Fixer
* Plugin URI:
* Description: Find/replace Flickr references
* Version: 1.0
* Author: Chris Hardie
* Author URI:
ChrisHardie / twitter-timeline-to-rss-feed.php
Last active Apr 6, 2021
Example PHP script to generate an RSS feed from a user's timeline for tweets that match a certain set of criteria
View twitter-timeline-to-rss-feed.php
* Generate an RSS feed from a Twitter user's timeline
* Chris Hardie <>
require "/path/to/vendor/autoload.php" ;
use Abraham\TwitterOAuth\TwitterOAuth;
ChrisHardie /
Created Feb 14, 2022
Simple Bash script to deploy a Laravel App
version=`php artisan --version`
if [[ ${version} != *"Laravel Framework"* ]]; then
echo "Not a Laravel app, exiting."
# Turn on maintenance mode