Skip to content

Instantly share code, notes, and snippets.

View scottnunemacher's full-sized avatar
😁
Doing the things

Scott Nunemacher scottnunemacher

😁
Doing the things
View GitHub Profile
@scottnunemacher
scottnunemacher / return-plural-if-needed.php
Last active August 8, 2022 18:11
PHP - Test a value and return plural if needed.
<?php
function get_plural($value, $singular, $plural = NULL){
if($value == 1){
return $singular;
} else {
if(!isset($plural)){
$plural = $singular.'s';
}
return $plural;
}
@scottnunemacher
scottnunemacher / myscript.sh
Created October 6, 2021 12:20 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@scottnunemacher
scottnunemacher / dovecot-doveadm-sync.md
Last active January 20, 2025 19:14
Sync (migrate) a Dovecot Email Account from One Dovecot Server to Another

Sync (migrate) a Dovecot Email Account from One Dovecot Server to Another

The man doveadm-sync pages are cryptic and not very well explained, as well they are missing quality real-world examples.

This gist aims to give some clarity and explanation.

Here is the command I got to successfully transfer (and sync backwards too) an email account from an old Dovecot email server to a new Dovecot email server:

To my knowledge, both servers must have a matching account already setup for this to work:

@scottnunemacher
scottnunemacher / docker-help.md
Last active December 21, 2018 02:53 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info