- 007
- Advantage
- Alert
- Backhander
- Badass
- Blade
- Blaze
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
import _ from 'lodash'; | |
export function topSort(definitions: _.Dictionary<string[]>) { | |
const visited: _.Dictionary<boolean> = {}; | |
const sorted: string[] = []; | |
const sortVertex = (vertex: string) => { | |
visited[vertex] = true; | |
for (const childVertex of _.get(definitions, vertex, <string[]>[])) { |
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
// https://davidpiesse.github.io/tailwind-md-colours/ | |
// | |
//Notes | |
// | |
//All colours are generated from Material Design Docs | |
//Colours have a base, a set of shades (50-900) accent colours | |
//In addition a companion set of contrast colours are included for colouring text / icons | |
// Example usage | |
// class="w-full bg-red-600 text-red-600-constrast" |
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 ee = new EventEmitter(); | |
ee.on('change', (note) => { | |
console.log('Change has been triggered.'); | |
if(note) { | |
console.log(note); | |
} | |
}); | |
ee.on('change', () => { |
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
class EventEmitter { | |
constructor() { | |
this.events = {}; | |
} | |
on(eventName, callback) { | |
if(!this.events[eventName]) { | |
this.events[eventName] = []; | |
} | |
this.events[eventName].push(callback); |
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
<phpunit> | |
<php> | |
<env name="APP_ENV" value="testing"/> | |
<env name="CACHE_DRIVER" value="array"/> | |
<env name="SESSION_DRIVER" value="array"/> | |
<env name="QUEUE_DRIVER" value="sync"/> | |
<env name="DB_CONNECTION" value="sqlite"/> | |
<env name="DB_DATABASE" value=":memory:"/> | |
</php> | |
</phpunit> |
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
protected function disableExceptionHandling() | |
{ | |
$this->app->instance(\Illuminate\Contracts\Debug\ExceptionHandler::class, new class extends \App\Exceptions\Handler { | |
public function __construct() {} | |
public function report(\Exception $e) {} | |
public function render($request, \Exception $e) | |
{ | |
throw $e; | |
} | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> | |
</head> | |
<body> |