Skip to content

Instantly share code, notes, and snippets.

View mattrayner's full-sized avatar
:octocat:
Tinkering

Matt Rayner mattrayner

:octocat:
Tinkering
View GitHub Profile
@mattrayner
mattrayner / fix.js
Last active July 30, 2019 09:56
Dinotropolis Cart Issues
/*
Below are updated functions which fix the issues noted in issues.js below.
I have tested these on my local machine and was able to make a booking successfully with the updated functions.
*/
function addQuantity(){
var quantity = parseInt($('#productSelectQuantity').val());
quantity++;
if(quantity < 0) // Handle quntity lower than 0
quantity = 1
@mattrayner
mattrayner / keybase.md
Created February 22, 2019 15:15
Keybase

Keybase proof

I hereby claim:

  • I am mattrayner on github.
  • I am mattrayner (https://keybase.io/mattrayner) on keybase.
  • I have a public key ASAarJOTnGJ8R2WqZ_-G5wAJBA5GJLeTbp_S8Gb4TPHLEQo

To claim this, I am signing this object:

@mattrayner
mattrayner / README.md
Created May 18, 2018 21:01 — forked from harlow/README.md
DynamoDB on Travis-CI

DynamoDB on Travis-CI

Leverage docker-compose to boot up the service and set a DYNAMODB_URL as an Env var. As described in the AWS Ruby SDK we can pass in a custom endpoint to the client.

client = Aws::DynamoDB::Client.new(endpoint: ENV['DYNAMODB_URL'])
@mattrayner
mattrayner / list.dust
Created May 15, 2018 15:26
List Component JSON
<{data.kind} class="list--{data.display}">
{#items}
<li>
{>"components__{name}" name=name data=data/}
</li>
{/items}
</ol>
@mattrayner
mattrayner / card.dust
Created May 15, 2018 15:17
Card Component JSON
<div class="card">
<div class="card__details">
{#data.components}
{>"components__{name}" name=name data=data/}
{/data.components}
</div>
</div>
@mattrayner
mattrayner / paragraph.dust
Created May 15, 2018 15:12
Paragraph Atom JSON
<p>
{data.content|s}
</p>
@mattrayner
mattrayner / heading.dust
Last active May 15, 2018 19:36
Heading Atom JSON
<h{data.weight}>
{data.content|s}
</h{data.weight}>
@mattrayner
mattrayner / README.md
Created July 4, 2017 09:45
Sparql docs
  • SPARQL Basics
    • CONSTRUCT
    • SELECT
  • Basic Syntax and Conventions
    • Variables
    • URIs
    • Indentation
  • Keywords
@mattrayner
mattrayner / ReportAdminExtension.php
Last active June 9, 2016 15:03
SilverStripe custom admin base url fix for ReportAdmin
<?php
class ReportAdminExtension extends Extension {
public function updateEditForm($form) {
$gridField = $form->Fields()->dataFieldByName('Reports');
if ($gridField instanceof GridField) {
$columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
$columns->setFieldFormatting(array(

Within Classes>AppDeligate.m scroll to the bottom and remove the references to Portrait and UpsideDown. It sould look like this when finished:

- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
{
    // iPhone doesn't support upside down by default, while the iPad does.  Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected).
    NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight);

    return supportedInterfaceOrientations;
}