Skip to content

Instantly share code, notes, and snippets.

View mathollingsworth's full-sized avatar

Mathew Hollingsworth mathollingsworth

  • Melbourne, Australia
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mathollingsworth on github.
  • I am francisbond (https://keybase.io/francisbond) on keybase.
  • I have a public key ASBCVdKru6ie6Rp8mpInfYD1kD7yO7pw8fpmQQ50T5Uxfwo

To claim this, I am signing this object:

@mathollingsworth
mathollingsworth / a common approach.js
Created October 26, 2015 22:53
A common approach
public function getTheNameOfTheBestBreakingBadCharacter() {
$allTheCharacters = $dataLayer->getAllCharacters();
$currentCharacter = null;
foreach ($allTheCharacters as $theCharacter) {
if($currentCharacter == null || $theCharacter>isBetter($currentCharacter)){
$currentCharacter = $theCharacter
}
}
@mathollingsworth
mathollingsworth / gist:184a1e9d170705867fde
Last active August 29, 2015 14:20
Craft Store Hours Open / Closed
{% set arrayPosition = now|date('w') %}
{% set today = openingHours.storeHours[arrayPosition] %}
{% set tomorrow = openingHours.storeHours[arrayPosition > 6 ? 0 : arrayPosition + 1] %}
<p class="u-mb0 text--center">
{% if today.open.getTimestamp() < now.getTimestamp() and today.close.getTimestamp() > now.getTimestamp() %}
<a href="{{ siteUrl }}menu" class="c--brand-secondary">Open today til late</a>
{% else %}