This file contains 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
const data = [ | |
{ first: 'David', last: 'Goldstein', age: 92 }, | |
{ first: 'Tom', last: 'Stamper', age: 23 }, | |
{ first: 'Sally', last: 'Brunswick', age: 76 }, | |
{ first: 'Steve', last: 'Henderson', age: 37 }, | |
{ first: 'Mark', last: 'Chopper', age: 75 }, | |
{ first: 'Lucy', last: 'Steel', age: 29 }, | |
] | |
// localeCompare is a String prototype: |
This file contains 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
const poop = ['one', 'two', 'three', 'four', 'five'] | |
// I always use `acc` and `item` by default | |
// acc is the thing being accumulated | |
// item is each item in `poop` | |
// basic idea: this will do nothing, | |
// add some console.logs in here and study the behaviour | |
// look at the example below that uses `i` and add it here with console.log | |
const ultraBasic = poop.reduce((acc, item) => { |
This file contains 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
// collect a haystack | |
const countries = [ | |
'Afghanistan', | |
'Åland Islands', | |
'Albania', | |
'Algeria', | |
'American Samoa', | |
'Andorra', | |
'Angola', | |
'Anguilla', |
This file contains 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
{ | |
"Vue component": { | |
"prefix": "vue", | |
"body": [ | |
"<template>", | |
" <div></div>", | |
"</template>", | |
"", | |
"<script>", | |
"export default {", |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | |
bootstrap="vendor/autoload.php" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
processIsolation="false" | |
stopOnFailure="false"> |
This file contains 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 Tests\Feature; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use App\OauthProvider; | |
use App\User; | |
use Illuminate\Support\Str; | |
use Illuminate\Testing\TestResponse; | |
use Laravel\Socialite\Facades\Socialite; |
This file contains 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 Tests\Feature; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Tests\TestCase; | |
class SomeTest extends TestCase | |
{ | |
use DatabaseTransactions; |
This file contains 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 Tests; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
abstract class TestCase extends BaseTestCase | |
{ | |
use CreatesApplication, DatabaseTransactions; |
This file contains 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 Tests; | |
use App\User; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
use Spatie\Permission\Models\Role; | |
abstract class TestCase extends BaseTestCase |
This file contains 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 Tests; | |
use App\User; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
use Spatie\Permission\Models\Role; | |
abstract class TestCase extends BaseTestCase |