I hereby claim:
- I am adrianb93 on github.
- I am adrianb93 (https://keybase.io/adrianb93) on keybase.
- I have a public key ASCrdxglElAe3bq9XB6spNbM9hFT-0LrG3-Sft2zNzAZlwo
To claim this, I am signing this object:
| <?php | |
| # | |
| # 1. Add the Macroable trait to your base test. | |
| # | |
| namespace Tests; | |
| use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
| use Illuminate\Support\Traits\Macroable; |
| // Google Chrome's date picker is pretty decent. This gives it the desired UX for copying and pasting. | |
| export default function (Vue, options) { | |
| Vue.mixin({ | |
| updated() { | |
| Array.from(document.querySelectorAll('input')).filter(input => input.type === 'date').forEach(input => { | |
| input.addEventListener('blur', onBlur); | |
| input.addEventListener('copy', onCopy); | |
| input.addEventListener('paste', onPaste); | |
| }); | |
| } |
| module.exports = { | |
| ... | |
| theme: { | |
| ... | |
| colors: { | |
| transparent: 'transparent', | |
| black: '#000', | |
| 'black-contrast': '#fff', | |
| white: '#fff', | |
| 'white-contrast': '#000', |
| <?php | |
| if (! function_exists('json_validate')) { | |
| /** | |
| * Validate a json string. | |
| * | |
| * @param string $json | |
| * @param boolean $throw | |
| * @return boolean | |
| * @throws \InvalidArgumentException |
| <p> | |
| Did you know that <span class="highlight">all goats</span> like eating their own hats? | |
| </p> |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| if (! function_exists('pipe')) { | |
| function pipe($passable) | |
| { | |
| return app(\App\Pipeline::class)->send($passable); | |
| } | |
| } | |
| if (! function_exists('paginate')) { |
| <?php | |
| namespace App\Models\Traits; | |
| use Illuminate\Support\Str; | |
| trait RegisterInModelEvents | |
| { | |
| /** | |
| * Register in-model event observers. This is to avoid creating a seperate |
| <?php | |
| // Title capitalisation function | |
| function title_caps($string) { | |
| // Needs work on recognising prepositions | |
| $conjunctions = [ 'an', 'and', 'as', 'at', 'but', 'by', 'else', 'etc', 'for', 'from', 'if', 'in', 'into', | |
| 'is', 'nor', 'of', 'off', 'on', 'or', 'per', 'out', 'over', 'so', 'the', 'then', 'to', | |
| 'up', 'via', 'vs', 'when', 'with', 'yet' ]; | |
| // Uppercase first letter of all words | |
| $string = preg_split('/(\W+)/', strtolower($string), -1, PREG_SPLIT_DELIM_CAPTURE); |
| // Simple parallax background effect by Adrian Brown | |
| // | |
| // Example HTML: | |
| // <div class="parallax fullscreen" | |
| // style="background-image: url(example.jpg);" | |
| // data-img-width="1280" | |
| // data-img-height="800" | |
| // data-difference="100"> | |
| // </div> |