Skip to content

Instantly share code, notes, and snippets.

Ben Hutton Relequestual

Block or report user

Report or block Relequestual

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
Relequestual / a path
Last active Nov 4, 2019
GA4GH Search - A path forward
View a path
Relequestual / migrations.php
Created Nov 16, 2012
Run multiple sql queries with CodeIgniter migrations
View migrations.php
Assuming you have an SQL file (or string) you want to run as part of the migration, which has a number of statements...
CI migration only allows you to run one statement at a time. If the SQL is generated, it's annoying to split it up and create separate statements.
This small script splits the statements allowing you to run them all in one go.
$sqls = explode(';', $sql);
foreach($sqls as $statement){
Relequestual /
Last active Sep 4, 2019
Search API - RC 5 Retrospective

Search API - RC 5 Retrospective


A retrospective is an agile process for continuous improvement of a team and their processes.

Firstly, thank you all for your contributions to the Search API specification, and those who spent much time leading up to the plenary implementing and raising questions! I know first-hand that open source work is hard, especially with a distributed team, committing time as and when they are able.

Thank you also to those who were able to attend the GA4GH plenary in Basel a while back. We had some great discussions, and I feel I made some great connections across other workstreams and projects.

Relequestual /
Last active Apr 8, 2019
GA4GH Search API Proposal

GA4GH Search API Proposal - Components

Executive Summary

The Matchmaker Exchange API is a successful live operating system which has resulted in real world life altering discoveries. Work on the Matchmaker Exchange API has shown that, while meeting most of the limited MME use cases, a more generalised discovery based API needs to be flexible, extensible, and planned for long term use.

A new discovery search based API should be expected to be in use for a minimum two decades once operational.

Keeping the barrier to entry low while not compromising on utility is essential. Each implementation of the API should be able to update to newer versions of the API at their own pace, without compromising interoperability. Each data repository exposing its data must be able to use as much or as little data for searching and responding to requests, is key.

View gist:ecb706c8aac981907964f1b790366247
"questionA": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"minLength": 1,
"enum": ["Yes", "No"]
Relequestual / idrefschema.json
Created Feb 7, 2018
Modified question schema
View idrefschema.json
"$schema": "",
"type": "object",
"allOf": [
"$schema": "",
"$id": "http:/",
"type": "object",
"properties": {
"type": {
Relequestual / BaseScene.swift
Created Feb 2, 2016
How to delegate a touch event to an entity when the entity has a component where the SKSpriteNode was defined, and the spritenode is underneeth another node based on z-index
View BaseScene.swift
// BaseScene.swift
// Hospital Demo
// Created by Ben Hutton on 17/11/2015.
// Copyright © 2015 Ben Hutton. All rights reserved.
import Foundation
import SpriteKit
import GameplayKit
  • sign in with twitter
  • import favourites
  • email user when import complete
  • view list of favourites
  • view all faves with images
  • view all faves with/out links
  • archive fave (de faves but kept on site)
  • search faves
  • search faves linked pages (so when import, save a cache of the article content or link included)
  • order by date
Relequestual / gist:5583353
Last active Dec 17, 2015
Get total count for use with pagination for MySQL
View gist:5583353
//if your query is raw sql you created, each mysql key word must be on a new line for this to work
$last_query = $this->db->last_query();
$pattern = '/(.*)Limit (.*)/i';
$new_query = preg_replace ($pattern, '', $last_query);
$pattern = '/(.*)Select *(.*)/i';
$new_query = preg_replace ($pattern, 'SELECT \'\'', $new_query);
$new_query = 'Select Count(*) AS res From (' . $new_query . ') v__dynamic;';
Relequestual / Onepage.php
Created Mar 28, 2013
Magento files for question posted on stackoverflow
View Onepage.php
class CheckTest_Model_Checkout_Type_Onepage extends Mage_Checkout_Model_Type_Onepage{
public function saveTestCheck($data){
//echo 'lalala';exit;
if (empty($data)) {
return array('error' => -1, 'message' => $this->_helper->__('Invalid data.'));
You can’t perform that action at this time.