Skip to content

Instantly share code, notes, and snippets.

View NoelDeMartin's full-sized avatar

Noel De Martin NoelDeMartin

View GitHub Profile
@NoelDeMartin
NoelDeMartin / Browser.php
Created November 30, 2017 08:52
Laravel Dusk Mail mocking proposal
<?php
namespace Tests\Browser\Dusk;
use Tests\Testing\MailFake;
use Laravel\Dusk\Browser as BaseBrowser;
class Browser extends BaseBrowser {
public function fake($service) {
@NoelDeMartin
NoelDeMartin / Freezable.vue
Last active June 17, 2019 19:36
Vue Freezable
<script>
let instancesCount = 0;
const rendersCache = {};
// See live example: https://x3t7g.codesandbox.io/
export default {
props: {
tag: {
type: String,
default: "div"
@NoelDeMartin
NoelDeMartin / README.md
Last active December 10, 2020 17:07
Laravel's tap helper implementation in Javascript & Typescript

I recently added this code to my utils package, so you are welcome to use it you want this. It's tree-shakable, so you don't have to worry about everything else!

@NoelDeMartin
NoelDeMartin / .bashrc
Last active March 9, 2022 09:43
Bash settings
# VSCode opens terminals in the project root, so this will make sure that
# you're using the correct version of npm and node
if [ -f .nvmrc ]; then
nvm install &> /dev/null
fi
# Change default prompt
PROMPT_COMMAND=__prompt_command
__prompt_command() {
@NoelDeMartin
NoelDeMartin / NovaServiceProvider.php
Created September 22, 2019 09:19
Laravel Nova resources boot method
<?php
namespace App\Providers;
use Laravel\Nova\Nova;
use Laravel\Nova\Cards\Help;
use Illuminate\Support\Facades\Gate;
use Laravel\Nova\NovaApplicationServiceProvider;
class NovaServiceProvider extends NovaApplicationServiceProvider