Skip to content

Instantly share code, notes, and snippets.

View donners's full-sized avatar

Donncha Fahy donners

View GitHub Profile
@donners
donners / tv-channel-blacklist.json
Created February 10, 2018 01:38
TV Channel Blacklist
[]
@donners
donners / tv-channel-groups.json
Last active February 10, 2018 01:58
TV Channel Groups
[
{
"name": "UK & Ireland",
"channels": [
"Yay1"
]
}
]
interface BranchingAssessmentEngine
{
/**
* @param string $assessmentDefinition JSON object defining the assessment
*/
public function __construct($assessmentDefinition);
/**
* Flags a question as being completed, with either a correct or incorrect response
*
<?php
namespace Learnosity\AuthoringBundle\Entity;
/**
* only used for Sheet and WidgetInstance
*
* Class AbstractEntitySW
* @package Learnosity\AuthoringBundle\Entity
*/
@donners
donners / gist:a7de1812ed85ae7058bf
Created November 21, 2014 06:15
Validate a single item
// you'll first need to work out which item the user is viewing, and retrieve its reference
var itemReference = 'ABC';
// itemsApp is the object returned by your call to LearnosityItems.init()
itemsApp.getItems(function (items) {
var responseIds = items[itemReference].response_ids;
for (var i = 0; i < responseIds.length; i++) {
itemsApp.question(responseIds[i]).validate();
}
});
@donners
donners / sqs_queue_delete.js
Created February 4, 2013 01:07
AWS console - SQS queue batch delete
$('.GP5VWI-DKP').each(function(e, item){if(item.innerText.match(/"consumer_id":"0032"/)){ $(':checkbox', item).click() }});
$('.GP5VWI-DLO').each(function(e, item){if(item.innerText.match(/"consumer_id":"0032"/)){ $(':checkbox', item).click() }});