Skip to content

Instantly share code, notes, and snippets.

Jordan Brauer jordanbrauer

View GitHub Profile
View composer.json
{
"require": {
"leocavalcante/siler": "^1.7",
"zendframework/zend-diactoros": "^2.2",
"zendframework/zend-httphandlerrunner": "^1.1"
}
}
@jordanbrauer
jordanbrauer / between.php
Created Sep 16, 2019
determine if a value is within range
View between.php
/**
* Determine if a numeric value is within range
*
* @return bool
*/
function between($subject, $min, $max): bool {
if (!is_numeric($subject) {
throw new LogicException;
}
@jordanbrauer
jordanbrauer / thanos.sh
Last active Jul 27, 2019
perfectly balanced, as all things should be
View thanos.sh
#!/usr/bin/env bash
echo 'ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgYC4tLTo6Ojo6LS0tLS5gYCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYC0tLy8vKysrKysrKysvLy8vLzo6Oi0uYCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgLS8rK
View _hda.scss
// Hexadecimal Alpha Colour function
@function hda($hexdec: null, $alpha: 1)
{
@if $hexdec == null {
// throw error if no value supplied for $hexdec
@error "$hexdex cannot be null: was, NULL";
} @else {
// evaluate input
@if $alpha >= 1 {
// return plain hexadecimal value if $alpha is greater than or equal to 1.
@jordanbrauer
jordanbrauer / workflow.md
Created Nov 13, 2017 — forked from stuartsaunders/workflow.md
Versioning and Git Workflow
View workflow.md

Semantic Versioning

Details:

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

@jordanbrauer
jordanbrauer / megamenu.bulma.html
Last active Oct 19, 2017
Bulma 0.6 implementation of the megamenu extension https://github.com/hunzaboy/bulma-megamenu
View megamenu.bulma.html
<nav class="navbar">
<div class="navbar-brand">
<div class="navbar-burger burger" data-target="navMenubd-example">
<span></span>
<span></span>
<span></span>
</div>
</div>
@jordanbrauer
jordanbrauer / prealoadImages.js
Created Jul 24, 2017
Preload images on page
View prealoadImages.js
preloadImages() {
let i = 0;
const arr = [...Backgrounds, ...Images];
return new Promise(resolve => {
arr.map(filename => {
const img = new Image();
img.src = filename;
img.onload = () => (++i == arr.length) ? resolve() : 1;
});
});
View gist:50adf19ebfb612fa753e88e22ae1f5d5
{%- comment -%}
--------------------------- WARNING ---------------------------
This file is auto-generated by BOLD and should not be modified.
It may be overwritten and any customizations would be lost.
--------------------------- WARNING ---------------------------
{%- endcomment -%}
<script>
@jordanbrauer
jordanbrauer / customers.sql
Created Jun 30, 2017 — forked from leek/README.md
Magento - Delete All Test Data
View customers.sql
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
View C3\Utility\DuplicateDatabase.php
<?php
namespace C3\Utility;
use Monolog\Logger;
/**
* Class DuplicateDatabase
*
* @package C3\Utility
You can’t perform that action at this time.