Creating Dapper models

My notes and tools for creating and using models for Dapper C# 10


How to create a one-to-many query with Dapper

This explains a way to use Dapper to create a one-to-many query (as shown on this Dapper documentation page).

.net-new dapper

Inserting a row with .NET 6 and Dapper

How to use .NET 6, C#, and Dapper to insert a row into SQL Server and return the row's id.

By-God-gotta-be-true programming rules

My list of long-held and opinionated programming rules.


Declarative DOM element event handlers

A quick way to bind DOM event handlers with JavaScript

This article provides a simple, declarative way to assign multiple DOM element event handlers using custom HTML attributes.


Configuring GitHub SSH key access

If you're using GitHub two-factor authentication be sure to see step #8

This article shows how to configure your local Linux machine for SSH access to GitHub. If you're using two-factor authentication don't miss step #8.


Avoid CSS design and layout frustration

This article explains how CSS's box-sizing property works.


How to customize Ubuntu's terminal tab titles

This simple change helps you manage multiple terminal tabs

Ubuntu's default terminal title display is a little verbose. It includes the current user and machine name and the current directory name (which is chopped off of the right end of the directory name). This default title text is never any help!

ubuntu terminal zsh

Install Source Code Pro font on Ubuntu

Source Code Pro is a great, free mono-spaced font. This article provides a Bash script for downloading and installing Source Code Pro on Ubuntu.

ubuntu bash fonts

Using grep, curl, and tail to scrape data from a Web page

Use Linux utilities to automate the boring, and error-prone, things

Linux includes a ton of great utilities that make Bash scripts better. This post looks at how to use Curl, Grep, and Tail to fetch the latest release number of Firefox Developer Edition to automate its installation.

ubuntu bash

A Bash script to install Firefox Dev Edition

Although this script is specifically for installing Firefox Dev Edition, it could easily be modified for other apps.

Another post on this blog explains how to install an Ubuntu app manually. While it's good to know what's going on with all those steps, this post puts all of that that article discusses into a reusable Bash script. This makes it very easy to keep an app like Firefox Dev Edition refreshed.

ubuntu bash

How to manually install an app on Ubuntu

Avoid conflicts and ensure you're getting the lastest version

Installing an app manually on Ubuntu isn't hard, but it's fiddly. Especially for Ubuntu rookies. However, if you take your time and pay attention to the details it's quite doable. This example shows how to install Firefox Developer Edition manually, but the instructions work for other Ubuntu applications.


How to refresh a MySQL database on a remote server with SCP and SSH

Pushing a fresh copy of a MySQL or MariaDB database is snap with a simple Bash script

When a project is in development you often need to copy a new instance of a MySQL refresh the server's database with the latest dev copy. This post provides a couple of Bash scripts to do that easily to and from the dev computer.

ubuntu mariadb mysql devops

How to easily read or write 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 obfuscated key values.

laravel php

Laravel's Eloquent ORM versus Query Builder

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


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 17.04 connects to network but not the Internet

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

An Ubuntu 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