Skip to content

Instantly share code, notes, and snippets.

@MohannadNaj
MohannadNaj / cls.md
Created January 28, 2020 18:08
User Script: Clear console by calling 'cls'

Using Tampermonkey extension:

// ==UserScript==
// @name         cls
// @version      0.1
// @description  Clear console by calling 'cls'
// @author       MohannadNaj
// @match        *://*/*
// @grant none
@MohannadNaj
MohannadNaj / alias.bat.md
Created February 18, 2018 01:26
My windows aliases list.

My windows aliases list.

Installation

1- Attaching Aliases to the native command line:

Steps in this stackoverflow answer.Quoting:

you may make the alias(es) persistent with the following steps,

@MohannadNaj
MohannadNaj / laravel-mix-phpunit-watcher.md
Last active April 26, 2020 12:34
PHPUnit watcher for Laravel Mix

PHPUnit watcher for Laravel Mix

I wrote this snippet to watch PHP files and run vendor/bin/phpunit on file changes.

Since chokidar is already installed on laravel-mix projects(it's one of mix dependencies), it's exactly the watcher we need, and we don't have to npm install anything more.

Steps:

1- On your laravel-mix root directory, create a new file called: phpunit-watcher.js:

Keybase proof

I hereby claim:

  • I am mohannadnaj on github.
  • I am mohannad (https://keybase.io/mohannad) on keybase.
  • I have a public key ASCwRQRVF3HkfNNWIaWyl2pXGfc351wswi7zgsk3ktrJ1go

To claim this, I am signing this object: