rogerpence.com

A nerd's blog

Easily modify PHP .env files

The EnvFile class provides the ability to easily add or change .env file key values and to create a sample .env file with obfuscate key values.

laravel php

A simple JavaScript stopwatch

User this JavaScript object to help instrument and diagnose your APIs

It's a good idea to have some metrics baked into APIs and other parts of your code. This simple little JavaScript object lets you easily capture the elapsed time in milliseconds.

javascript

Laravel's Eloquent ORM versus Query Builder

Using Laravel's Query Builder instead of its Eloquent ORM for better control over Json output.

laravel

How to reset MariaDB's root user password

Don't freak out--this isn't a very challenging task

It's late at night and you just need to do a little work with MariaDB (or MySQL) but you've completely forgotten the root password. With a little command line effort, this is an easy problem to solve.

ubuntu

Ubuntu 17.04 connects to network but not the Internet

I'm not sure what I did to fix it, but it works now!

An Unbuntu 17.04 VirtualBox VM, (running from an Ubuntu 16.04 host) suddenly stopped connecting to the Internet. The last time it was running all was well; then one day, at boot-up, it couldn't connect to the Internet. Other Ubuntu VMs internet connections worked just fine. This wasn't a problem with the host, it appeared to be isolated to the one VM.

ubuntu virtualbox

Launch VirtualBox VM with a .desktop file

Ubuntu .desktop files are easy to create with a simple text editor

VirtualBox is a great, free, virtual machine engine. However, its multiple monitor capabilities are a little prickly. Launching the VM with one monitor when the settings are set for two monitors is sometimes troublesome. The problem is easy to fix: just change the VM settings to one or two monitors. But it's annoying to have to remember to do that. This post shows how to resolve this challenge with a couple of simple Ubuntu .desktop files.

ubuntu virtualbox