DEV Community

Discussion on: How I automate my OS 💻

Collapse
 
manierim profile image
Marco Manieri

Very nice article.

I do use the Windows profile file (well, actually through cmder/conEmu but doesn't change so much) to automate a few common task for basic development without docker or other "virtualwares":

function yw {
    yarn watch -new_console
}

function aserve {
    php artisan serve $args -new_console
}

function ngs {
    ngrok http 80 -new_console
    explorer "http://127.0.0.1:4040"
}

function nginxl {
    explorer "http://127.0.0.1"
    nginx -p ".nginx" -new_console

// contains a bare nginx
// conf to proxy the ngrok 
// port 80 to php (on 8000)
// and other services (per
// project, i.e. Laravel
// websockets server on
// 6001 - not shown

}

function serveall {
    yw
    aserve
    nginxl
    ngs
}

And then my favorite

function gocode {
    serveall
    code .
}
Collapse
 
juliani profile image
Julian Iaquinandi

Thanks, I appreciate it. I like Cmder/Conemu really good terminal for Windows but I'm back on linux for the foreseeable I think.

I've not yet tried the new Windows Terminal but I've heard good things.