Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@andrewrjones
andrewrjones / keybase.md
Created September 19, 2019 12:34
keybase.md

Keybase proof

I hereby claim:

  • I am andrewrjones on github.
  • I am andrewjones (https://keybase.io/andrewjones) on keybase.
  • I have a public key ASDFYw4PV2enzzFXZgGUXzKdulxZADoDS59h3k1FWdz1Ego

To claim this, I am signing this object:

Hi,
My step points are not automatically being uploaded from my Apple Watch. My workouts are, and the Vitality watch app shows my steps, but the steps are not being uploaded, and never have been.
Please find attached my step data and add my missing points. The screenshots were taken following these steps:
- Open Apple Health app
- Click on 'Activity'
@andrewrjones
andrewrjones / docker-compose-postgres.yaml
Created October 9, 2017 16:11
Bring up Kafka, Debezium, and Schema Registry
version: '2'
services:
zookeeper:
image: debezium/zookeeper:${DEBEZIUM_VERSION}
ports:
- 2181:2181
- 2888:2888
- 3888:3888
kafka:
image: debezium/kafka:${DEBEZIUM_VERSION}
@andrewrjones
andrewrjones / asset-check.pl
Last active August 29, 2015 14:04
Quick and dirty Perl script to email me a report of sites possibly hosting my assets. See http://andrew-jones.com/blog/prevent-other-sites-from-serving-your-assets-with-nginx/
#!perl
#
# See http://andrew-jones.com/blog/prevent-other-sites-from-serving-your-assets-with-nginx/
use strict;
use warnings;
use URI::Split qw(uri_split);
use Data::Dumper;
use Email::MIME;
@andrewrjones
andrewrjones / signal_test.pl
Created March 31, 2014 15:58
keep doing something until we catch an INT signal (Ctrl + C)
#!perl
# keep doing something until we catch an INT signal (Ctrl + C)
use strict;
use warnings;
my $running = 1;
$SIG{INT} = sub { $running = 0 };
@andrewrjones
andrewrjones / build.xml
Last active December 20, 2015 15:38
Ant task to run Perl code through perltidy. Windows and Unix.
<!-- perltidy executable -->
<condition property="perltidy.exe" value="perltidy.bat">
<os family="windows" />
</condition>
<condition property="perltidy.exe" value="perltidy">
<os family="unix" />
</condition>
<fail unless="perltidy.exe">No perltidy executable defined for this OS</fail>
<target name="perl:tidy" description="Tidies the Perl code" depends="">
@andrewrjones
andrewrjones / yours2nginx.php
Created April 26, 2013 22:37
Script to migrate short URLs from YOURLs to nginx.
#!/usr/bin/php
<?php
/*
This script takes all the short URL's in the YOURLs database and generates
an nginx config file containing the correct redirects.
Use if you want to migrate away from YOURLs and use nginx to ensure the links
continue to work.
@andrewrjones
andrewrjones / arsenal-ticket-email.pl
Created September 15, 2012 16:45
Lets me know when Arsenal tickets are available
#!perl
use v5.10.1;
use strict;
use warnings;
use Getopt::Long;
use Storable qw(store retrieve);
@andrewrjones
andrewrjones / gist:1876882
Created February 21, 2012 14:40
Slurping text from a file
sub slurp_from_file {
my ( $self, $file ) = @_;
return do {
local $/ = undef;
open my $fh, "<", $file
or die "could not open $file: $!";
my $doc = <$fh>;
# ensure there are no carriage returns
@andrewrjones
andrewrjones / HttpContextFactory.cs
Created February 7, 2012 13:32
Factory method to allow us to mock HttpContext when testing
using System.Web;
namespace AndrewJones
{
/// <summary>
/// Factory method to allow us to mock HttpContext when testing
/// </summary>
public static class HttpContextFactory
{
private static HttpContextBase mockHttpContext;