Skip to content

Instantly share code, notes, and snippets.

View garethtdavies's full-sized avatar

Gareth Davies garethtdavies

View GitHub Profile
@garethtdavies
garethtdavies / alarm_on.php
Created March 14, 2014 17:26
Turning an alarm on with a Spark Core
<?php
use Wensleydale\SparkCore;
use Wensleydale\SparkException;
require $_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php';
//Get your access token from either the Spark Build site or make a token request
$accessToken = 'access_token';
//Create a new Spark instance
@garethtdavies
garethtdavies / alarm_off.php
Created March 14, 2014 17:27
Turning an alarm off with a Spark Core
<?php
use Wensleydale\SparkCore;
use Wensleydale\SparkException;
require $_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php';
//Get your access token from either the Spark Build site or make a token request
$accessToken = 'access_token';
//Create a new Spark instance
@garethtdavies
garethtdavies / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@garethtdavies
garethtdavies / gist:5033798
Created February 25, 2013 22:09
Sample Japanese
(社)神奈川経済同友会、(社)神奈川県経営者協会、 (社)横浜銀行協会、横浜港運協会、(社)横浜港振興協会、(社)横浜青年会議
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!-- Consider adding an manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
@garethtdavies
garethtdavies / webhooks-php-dynamic-destination.php
Last active April 12, 2016 20:53
Webhooks PHP Dynamic Destinations
<?php
/**
* @param string $application_id
* @param string $customer_id
* @param string $bucket_key
* @param string $endpoint_url
* @param string $gateway
* @return string
*/
@garethtdavies
garethtdavies / sample.xml
Last active November 1, 2016 20:53
Sample Live Timing Standard v1.1
<?xml version="1.0" encoding="UTF-8"?>
<timing>
<date>2016-09-11 18:35:05.143−04:00</date>
<start_time>2016-09-11 16:30:13−04:00</start_time>
<event_id>97645</event_id>
<event_name>2016 ITU World Triathlon Grand Final Cozumel</event_name>
<prog_id>281501</prog_id>
<prog_name>Elite Men</prog_name>
<wetsuit>false</wetsuit>
<sandbox>false</sandbox>

Keybase proof

I hereby claim:

  • I am garethtdavies on github.
  • I am garethtdavies (https://keybase.io/garethtdavies) on keybase.
  • I have a public key ASAIP4F1vI_ozWNT5Y1lbTkHOzcvBjfVEQDFTXjC2yhtawo

To claim this, I am signing this object:

@garethtdavies
garethtdavies / yokohama-ew-official.json
Last active May 15, 2017 18:22
Yokohama Elite Women Official Timing Message
{
"date":"2017-05-13 08:20:16+09:00",
"start_time":"2017-05-13 10:06:00+09:00",
"event_id":"107160",
"event_name":"2017 ITU World Triathlon Yokohama",
"prog_id":"307210",
"prog_name":"Elite Women",
"wetsuit":"false",
"sandbox":"false",
"num_athletes":"55",
@garethtdavies
garethtdavies / leeds-start-list-message.json
Last active May 15, 2017 18:42
Leeds start list message
{
"date":"2017-05-15T18:38:01+0000",
"start_time":"2017-06-11T14:39:00+0000",
"event_id":"107161",
"event_name":"2017 ITU World Triathlon Leeds",
"prog_id":"307248",
"prog_name":"Elite Men",
"wetsuit":null,
"sandbox":"false",
"num_athletes":"55",