This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"schemaVersion":1,"label":"coverage","message":"100%","color":"brightgreen"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Concerns; | |
use Illuminate\Database\Eloquent\Model; | |
trait TracksPreviousAttributes | |
{ | |
protected $previous = []; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Http\Request; | |
abstract class ApiSearchQuery | |
{ | |
/** | |
* @var string The model class for the query. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openInNewTab(url) { | |
const win = window.open(url, '_blank'); | |
win.focus(); | |
} | |
const pattern = ['t', 'e', 'l', 'e', 's', 'c', 'o', 'p', 'e']; | |
let current = 0; | |
const keyHandler = (event) => { | |
// If the key isn't in the pattern, or isn't the current key in the pattern, reset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Reduce a collection of numbers to groups of ranges | |
* | |
* @example dayRange(collect([1,2,3,5,6,10])) = "1 - 3 & 5 - 6 & 10" | |
* | |
* @param Collection $days | |
* @return string | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
Lorem ipsum generator | |
Usage: | |
{{ import 'lipsum.njk' as lipsum }} | |
{{ lipsum.sentence() }} | |
#} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Performant window resize event listener | |
* @return {object} | |
* | |
* @usage | |
* import windowResize from './window-resize'; | |
* windowResize.listen(() => { | |
* ... | |
* }); | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get current CSS breakpoint from doc body pseudo element | |
* Fires custom event 'breakpoint-changed' every time a new breakpoint is hit | |
* | |
* @type {Object} | |
* { | |
* current: {string} current breakpoint, | |
* previous: {string} previous breakpoint, | |
* } | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prevent regularly called functions (scroll/resize event listeners, etc..) from | |
* getting out of hand. | |
* | |
* @param {Function} callback Function to debounce | |
* @param {integer} wait Delay between function calls in ms | |
* @param {Objects} context Passed as `this` in debounced function | |
* @return {Function} debounced function | |
* | |
* @usage |