Salt file.recurse source file not found (file encoding issue)

So I was running this:

/var/www/jj-web-1-www.jj5.net-sixsigma:
  file.recurse:
    - clean: True
    - user: root
    - group: root
    - dir_mode: 755
    - file_mode: 644
    - source: salt://inst/mediawiki-1.29
    - require:
      - pkg: apache2

And getting an error like this:

----------
          ID: /var/www/jj-web-1-www.jj5.net-sixsigma
    Function: file.recurse
      Result: False
     Comment: #### /var/www/jj-web-1-www.jj5.net-sixsigma/vendor/james-heinrich/getid3/getid3/module.audio.ac3.php ####
              Source file 'salt://inst/mediawiki-1.29/vendor/james-heinrich/getid3/getid3/module.audio.ac3.php?saltenv=base' not found

              #### /var/www/jj-web-1-www.jj5.net-sixsigma/vendor/james-heinrich/getid3/getid3/module.audio-video.mpeg.php ####
              Source file 'salt://inst/mediawiki-1.29/vendor/james-heinrich/getid3/getid3/module.audio-video.mpeg.php?saltenv=base' not found
     Started: 14:27:18.352264
    Duration: 134735.945 ms
     Changes:
----------

The issue was that the source files mentioned weren’t in UTF-8 format. To convert the files I ran, e.g.:

$ iconv -f WINDOWS-1252 -t UTF-8//TRANSLIT < module.audio-video.mpeg.php.bak > module.audio-video.mpeg.php

(Actually I couldn’t get the ‘iconv’ command to work so I edited manually in Vim)

Installing .NET on Debian 9

After installing Visual Studio Code I followed the instructions from .NET Tutorial – Hello World in 10 minutes, basically:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/9/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

Then:

sudo apt-get update
sudo apt-get install dotnet-sdk-2.1

Then for example to create a new console project:

dotnet new console -o myApp
cd myApp

I ended up reading MICROSOFT SOFTWARE LICENSE TERMS for the MICROSOFT .NET LIBRARY which included this doozy:

The software may collect information about you and your use of the software, and send that to Microsoft.

Ah, Microsoft. You haven’t changed.

I found some notes about how to disable telemetry:

Telemetry
———
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn’t include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to ‘1’ or ‘true’ using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

I have added the opt-out environment variable via jj5-bin.

Create a desktop alias for an SMB mount on Mac OS X

So to create an alias to an SMB share on your Mac desktop:

First use Finder -> Go -> Connect to Server…

Enter a location such as: smb://server/share

Then use Finder -> Preferences… -> Show: Connected servers

The SMB mount should now be visible on the desktop. Right-click the share on the desktop and choose ‘Make Alias’. Then take connected servers out of your Finder preferences and rename the desktop alias probably as the name of the share.