<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jason</title>
    <description>The latest articles on DEV Community by Jason (@ijason).</description>
    <link>https://dev.to/ijason</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F70308%2F4fcea1a2-953f-4cff-808c-0d444fe26303.png</url>
      <title>DEV Community: Jason</title>
      <link>https://dev.to/ijason</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ijason"/>
    <language>en</language>
    <item>
      <title>CPU Mining on a Raspberry Pi</title>
      <dc:creator>Jason</dc:creator>
      <pubDate>Sun, 02 Aug 2020 20:58:59 +0000</pubDate>
      <link>https://dev.to/ijason/cpu-mining-on-a-raspberry-pi-1e1d</link>
      <guid>https://dev.to/ijason/cpu-mining-on-a-raspberry-pi-1e1d</guid>
      <description>&lt;p&gt;Monero is one of the most profitable cryptocurrencies that can still be mined using a CPU. Unlike other cryptocurrencies that rely on specialized hardware, you can mine XMR (RandomX) using your computer or, in this case, a raspberry pi. With that said if you’re going to use your raspberry pi to mine Monero don’t expect to get rich doing so. This is more of a learning experience if you have a spare raspberry pi lying around or if you simply want to support the coin.&lt;/p&gt;

&lt;p&gt;To get started, you should already have Raspian running on your pi. If you haven’t done so already I suggest you follow &lt;a href="https://www.raspberrypi.org/documentation/raspbian/"&gt;one of the many tutorials out there&lt;/a&gt;. Its your choice whether you choose to have a monitor, keyboard and mouse attached to your pi or if you prefer to go headless and utilize SSH. I prefer the latter but this tutorial can be done either way. We’re going to be using &lt;a href="https://github.com/xmrig/xmrig"&gt;XMRig&lt;/a&gt; to mine Monero with a mining pool. XMRig only runs on 64-bit so we’ll be using a 64-bit container called &lt;a href="https://github.com/sakaki-/raspbian-nspawn-64"&gt;raspbian-nspawn-64&lt;/a&gt;. First let’s make sure you’re raspberry pi is up to date. Using terminal lets run the following commands:&lt;br&gt;&lt;br&gt;
&lt;code&gt;sudo apt update&lt;br&gt;
sudo apt full-upgrade&lt;br&gt;
&lt;/code&gt;&lt;br&gt;&lt;br&gt;
For good measure, lets run clean up to free up some space:&lt;br&gt;&lt;br&gt;
&lt;code&gt;sudo apt-get clean&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Reboot if necessary:&lt;br&gt;&lt;br&gt;
&lt;code&gt;sudo shutdown -r now&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once you’re pi is up to date, we can get started installing raspbian-nspawn-64 using the following command:&lt;br&gt;&lt;br&gt;
&lt;code&gt;sudo apt-get install -y raspbian-nspawn-64&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you’re not currently using the official 64-bit kernel, you’ll be prompted to enable it during installation. Select &lt;strong&gt;Yes&lt;/strong&gt; and you should be prompted to reboot afterwards. If you were already using the 64-bit kernel then a reboot isn’t necessary. Once everything is installed and you’ve rebooted if necessary, you can start using the 64-bit container with the following command:&lt;br&gt;&lt;br&gt;
&lt;code&gt;ds64-shell&lt;/code&gt;&lt;br&gt;&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QoK_wqLR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/08/64bitContainer.png%3Fresize%3D600%252C47" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QoK_wqLR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/08/64bitContainer.png%3Fresize%3D600%252C47" alt=""&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To return to 32-bit simply type &lt;strong&gt;exit&lt;/strong&gt;. You can toggle between 32-bit and 64-bit with these commands.&lt;/p&gt;

&lt;p&gt;Now let’s install XMRig from within your 64-bit shell. First you’ll need to install all the dependencies.&lt;br&gt;&lt;br&gt;
&lt;code&gt;sudo apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once thats finished with hopefully no errors run the following commands:&lt;br&gt;&lt;br&gt;
&lt;code&gt;git clone https://github.com/xmrig/xmrig.git&lt;br&gt;
cd xmrig&lt;br&gt;
mkdir build&lt;br&gt;
cd build&lt;br&gt;
cmake ..&lt;br&gt;
make&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The build process can take some time to complete so be patient. After installation the next step is to choose a mining pool and start mining. I choose &lt;a href="https://www.supportxmr.com/"&gt;supportxmr&lt;/a&gt; because of their low pool fee but feel free to choose what best works for you. To start mining type:&lt;br&gt;&lt;br&gt;
&lt;code&gt;./xmrig --donate-level 1 -o pool.supportxmr.com:3333 -u 49NU9LmdsTc1KCiiRd9LE4Qm23gt1i75vWHsTGhB8agy93K4cq16KVtLKifsBy3YdzT2Zg69ggDKfDq5YdnfWshG6BZxGh3 -p YourWorkerName&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Make sure you run this from the build folder. If you aren’t already there then its &lt;code&gt;cd xmrig/build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;–donate-level&lt;/strong&gt; can be set to whatever you feel like donating to the pool.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;-o&lt;/strong&gt; is the URL of your pool.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;-u&lt;/strong&gt; should be your Monero wallet address. Make sure to change that to your address or else you’ll be giving to me free XMR!&lt;br&gt;&lt;br&gt;
&lt;strong&gt;-p&lt;/strong&gt; stands for password but since SupportXMR doesnt require a password, this is used to identify your worker so give it a unique name.&lt;/p&gt;

&lt;p&gt;Thats all you need to get started mining Monero on your Raspberry Pi.&lt;/p&gt;

&lt;p&gt;For other XMRig options use &lt;code&gt;./xmrig -h&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/08/Screen-Shot-2020-08-02-at-3.54.45-PM.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cZ7byYWD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/08/Screen-Shot-2020-08-02-at-3.54.45-PM.png%3Fresize%3D600%252C224" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>raspberrypi</category>
      <category>xmr</category>
      <category>monero</category>
      <category>randomx</category>
    </item>
    <item>
      <title>MS SQL Server on MacOS with Docker and VS Code</title>
      <dc:creator>Jason</dc:creator>
      <pubDate>Mon, 13 Apr 2020 21:43:03 +0000</pubDate>
      <link>https://dev.to/ijason/ms-sql-server-on-macos-with-docker-and-vs-code-2fpe</link>
      <guid>https://dev.to/ijason/ms-sql-server-on-macos-with-docker-and-vs-code-2fpe</guid>
      <description>&lt;p&gt;Now that Docker has made every developers life easier, I’m going to walk you through a few quick steps to get Microsoft SQL Server up and running on MacOS. The first thing you need to do is install Docker on your Mac.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Docker&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I chose to install &lt;a href="https://www.docker.com/products/docker-desktop" rel="noopener noreferrer"&gt;Docker Desktop&lt;/a&gt; so that’ll be what I’ll be using for this tutorial. You can choose to install Docker Toolbox if you choose. Use the following link to determine which best fits your needs: &lt;a href="https://docs.docker.com/docker-for-mac/docker-toolbox/" rel="noopener noreferrer"&gt;https://docs.docker.com/docker-for-mac/docker-toolbox/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Settings&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Once Docker Desktop is installed, launch it and open the settings by clicking the docker icon and selecting Preferences.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-13-at-3.23.21-PM.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi2.wp.com%2Fblog.ijasoneverett.com%2Fwp-content%2Fuploads%2F2020%2F04%2FScreen-Shot-2020-04-13-at-3.23.21-PM.png%3Fresize%3D356%252C367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will launch your Docker Dashboard. Once opened, clicked the Settings gear at the top right and click on Resources &amp;gt;&amp;gt; Advanced. SQL Server needs at least 3.2 GBs of memory so increase the Memory to 4 GBs and click Apply &amp;amp; Restart.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i0.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-13-at-3.23.56-PM.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi0.wp.com%2Fblog.ijasoneverett.com%2Fwp-content%2Fuploads%2F2020%2F04%2FScreen-Shot-2020-04-13-at-3.23.56-PM.png%3Fresize%3D600%252C356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download the SQL Server Image&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
To download the SQL Server image, open Terminal and type the following:&lt;br&gt;&lt;br&gt;
&lt;code&gt;docker pull mcr.microsoft.com/mssql/server:2019-latest&lt;/code&gt;&lt;br&gt;&lt;br&gt;
This will download the latest SQL Server 2019 image to your mac.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Launch the SQL Server Image&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
From Terminal, run the following command:&lt;br&gt;&lt;br&gt;
&lt;code&gt;docker run --name ms_sql_server -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=5uper5trongPW!' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Don’t forget to change the password to your own secure password. This command sets the name of the docker container to ms_sql_server. The user is defaulted to sa. For more configuration settings, go the &lt;a href="https://hub.docker.com/_/microsoft-mssql-server" rel="noopener noreferrer"&gt;MS SQL Server container hub&lt;/a&gt;. Once you launch the image it’ll be available in Docker Dashboard. From here you can stop the image, restart it, delete, etc.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i0.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-13-at-3.33.27-PM.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi0.wp.com%2Fblog.ijasoneverett.com%2Fwp-content%2Fuploads%2F2020%2F04%2FScreen-Shot-2020-04-13-at-3.33.27-PM.png%3Fresize%3D600%252C349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visual Studio Code&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
There are several MS SQL Server GUIs available for MacOS but I prefer to use VS Code since its my development tool of choice. To install the MS SQL extension on VS Code, click the extensions icon and type: &lt;em&gt;mssql&lt;/em&gt;. From the search results, select &lt;em&gt;SQL Server (mssql)&lt;/em&gt; and click Install. After the installation completes, select Reload to enable the extension. Once enabled, you’ll have a SQL Server icon on the left. Click on it and select Add Connection.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i0.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-13-at-3.44.55-PM.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi0.wp.com%2Fblog.ijasoneverett.com%2Fwp-content%2Fuploads%2F2020%2F04%2FScreen-Shot-2020-04-13-at-3.44.55-PM.png%3Fresize%3D358%252C516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow the prompts, using localhost as hostname, sa as user and your password you set up when launching the SQL Server image. You should also give your connection a name to be able to identify it later. For this tutorial I named my connection TestSQL.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2020/04/Screen-Shot-2020-04-13-at-3.49.22-PM.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi2.wp.com%2Fblog.ijasoneverett.com%2Fwp-content%2Fuploads%2F2020%2F04%2FScreen-Shot-2020-04-13-at-3.49.22-PM.png%3Fresize%3D600%252C378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it! You now are free to create your database, tables, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
If you stop and remove your container, you’ll lose all your SQL Server data. To avoid this you can create a backup of your database or you can &lt;a href="https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-docker?view=sql-server-ver15#use-data-volume-containers" rel="noopener noreferrer"&gt;persist your data in volume containers&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>net</category>
      <category>docker</category>
      <category>macos</category>
      <category>mssqlserver</category>
    </item>
    <item>
      <title>How do you stay up to date with ever changing technologies without going insane?</title>
      <dc:creator>Jason</dc:creator>
      <pubDate>Thu, 13 Jun 2019 14:40:45 +0000</pubDate>
      <link>https://dev.to/ijason/how-do-you-stay-up-to-date-with-ever-changing-technologies-without-going-insane-5g0l</link>
      <guid>https://dev.to/ijason/how-do-you-stay-up-to-date-with-ever-changing-technologies-without-going-insane-5g0l</guid>
      <description>&lt;p&gt;I sometimes feel overwhelmed trying to stay up to date with the latest technologies.  I'm a .NET developer so I focus on that more than anything but I also like to code in other languages which makes staying up to date overwhelming.&lt;/p&gt;

&lt;p&gt;For example, .NET Core 3.0 Preview 6 was just released with changes to Blazor which I'm super excited about.  Apple recently released SwiftUI and my first run at it was extremely positive.  On top of all that, I really want to learn more about React and Vue since they seem to be whats trendy right now.  &lt;/p&gt;

&lt;p&gt;How do you find the time to stay up to date with everything?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>dotnet</category>
      <category>javascript</category>
    </item>
    <item>
      <title>.NET Core, Identity and MySQL on MacOS</title>
      <dc:creator>Jason</dc:creator>
      <pubDate>Sun, 02 Jun 2019 22:40:34 +0000</pubDate>
      <link>https://dev.to/ijason/net-core-identity-and-mysql-on-macos-4a3i</link>
      <guid>https://dev.to/ijason/net-core-identity-and-mysql-on-macos-4a3i</guid>
      <description>&lt;p&gt;I recently went through the pain of developing a .NET Core MVC website on MacOS. This post is meant to help you get started using Identity authentication and MySQL as your backend database.&lt;/p&gt;

&lt;p&gt;I’m going to assume you have .NET Core SDK installed. If you don’t make sure you &lt;a href="https://dotnet.microsoft.com/download/dotnet-core"&gt;install the latest version&lt;/a&gt;. The current version is 2.2 since 3.0 is still in preview. To confirm you have installed it correctly, open up terminal and type &lt;code&gt;dotnet --info&lt;/code&gt;. I just gave it a try and realized I’m not even running the latest version of .NET Core. This whole time I thought I was running version 2.2 but instead I’m running 2.1.9. This explains all the issues I was having.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i1.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/coreversion.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--goAYbSRF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/coreversion.png%3Fresize%3D600%252C420" alt=".NET Core version"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Before we get started, this is the environment I’m currently using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;.NET Core 2.1.9 (forgive me)&lt;/li&gt;
&lt;li&gt;Visual Studio 2019 for Mac (free community edition)&lt;/li&gt;
&lt;li&gt;MAMP Pro (for MySQL)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course you don’t need MAMP Pro to run MySQL. You can install MySQL directly but I had been doing some PHP development in the past and MAMP Pro came in handy back then.&lt;/p&gt;

&lt;p&gt;Ok lets get started! Open up terminal and run the following commands:&lt;br&gt;&lt;br&gt;
&lt;code&gt;mkdir IdentityProject&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;cd IdentityProject&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet new mvc --auth Individual&lt;/code&gt;&lt;br&gt;&lt;br&gt;
You can create a new project through the Visual Studio interface but as of 06/02/2019, you don’t have the option to choose the authentication type. The command line is the way to go. Now that we created our project, lets install the required Nuget packages.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Microsoft.EntityFrameworkCore.Tools&lt;/li&gt;
&lt;li&gt;Microsoft.EntityFrameworkCore.Design&lt;/li&gt;
&lt;li&gt;Pomelo.EntityFrameworkCore.MySql&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Run the following command in terminal making sure you’re still in the IdentityProject directory:&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet add package Microsoft.EntityFrameworkCore.Tools&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Immediately I’m hit with a version conflict error. This is due to the fact that I am not running the latest version of .NET Core. If you are using the latest version then you shouldn’t have this error. At least thats what I’m assuming.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i0.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-4.01.37-PM.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e5fG1tuu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-4.01.37-PM.png%3Fresize%3D600%252C420" alt="Version conflict error"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Ok lets remove that package and install the correct version.&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet remove package Microsoft.EntityFrameworkCore.Tools&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet restore&lt;/code&gt;&lt;br&gt;&lt;br&gt;
To save you the trouble of figuring out which version you need to install, I’m just going to tell you that I need version 2.1.8 installed. I figured this out after some trial and error so lets try this again.&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet add package Microsoft.EntityFrameworkCore.Tools --version 2.1.8&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet add package Microsoft.EntityFrameworkCore.Design --version 2.1.8&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet add package Pomelo.EntityFrameworkCore.MySql --version 2.1.4&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet restore&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Now we should be good to go. Open up the project in Visual Studio. You should have a plain MVC project in front of you.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i1.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-4.17.38-PM.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g2HUHViE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-4.17.38-PM.png%3Fresize%3D600%252C395" alt="Visual Studio for Mac"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
The next step is to set up your MySQL database. Open MySql and create a new database. Lets call it IdentityDB. Now we have a blank database with no tables. Open up &lt;code&gt;appsettings.json&lt;/code&gt; in Visual Studio and add the connection string to your database.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "ConnectionStrings": {
    "DefaultConnection": "server=127.0.0.1;port=8889;database=IdentityDB;user=root;password=&amp;lt;YOUR_PASSWORD&amp;gt;;CharSet=utf8;SslMode=none;"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "AllowedHosts": "*"
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let’s make some changes to &lt;code&gt;Startup.cs&lt;/code&gt; to switch from using SqlLite to MySQL.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services.AddDbContext&amp;lt;ApplicationDbContext&amp;gt;(options =&amp;gt;
                options.UseMySql(
                    Configuration.GetConnectionString("DefaultConnection")));
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now we need to create the initial migration to allow entity framework to create the Identity tables for us. From terminal and from within the IdentityProject directory run the following command:&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet ef migrations add InitialCreate&lt;/code&gt;&lt;br&gt;&lt;br&gt;
You should be able to see your migration files from Visual Studio. Normally they would be under Data &amp;gt;&amp;gt; Migrations but sometimes the Migrations folder gets created in the root. Either way the files should be there. Now run the following command to create the identity tables in your database:&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet ef database update&lt;/code&gt;&lt;br&gt;&lt;br&gt;
I received the following error:&lt;br&gt;&lt;br&gt;
&lt;a href="https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-4.50.18-PM.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o3lcNn2x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-4.50.18-PM.png%3Fresize%3D600%252C420" alt="EF Error"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
I think this is caused by running an older version of MySql. I’m currently using MySql 5.5 and the latest is 8.0 so I’m way behind. To fix this error open up &lt;code&gt;CreateIdentitySchema.cs&lt;/code&gt; from your migrations folder. Locate the code that creates the &lt;code&gt;AspNetUsers&lt;/code&gt; table. &lt;strong&gt;&lt;em&gt;Note: if you don’t have a &lt;code&gt;CreateIdentitySchema.cs&lt;/code&gt; file then the code is located under &lt;code&gt;InitialCreate.cs&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
 Also keep in mind that these files are prefixed with numbers.&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
 Locate the following line:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LockoutEnd = table.Column&amp;lt;DateTimeOffset&amp;gt;(nullable: true),
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;and change it to:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LockoutEnd = table.Column&amp;lt;DateTimeOffset&amp;gt;(nullable: true, type: "DateTime"),
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We should be good to go. Before we perform the migration, open up your database and Drop any tables that might have been created while performing the first migration. This is to ensure you don’t run into any conflicts. Now run the following:&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet ef database update&lt;/code&gt;&lt;br&gt;&lt;br&gt;
If you didn’t receive any errors you should have all the identity tables in your database.&lt;br&gt;&lt;br&gt;
&lt;a href="https://i1.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-5.11.32-PM.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lmD7P1pd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/blog.ijasoneverett.com/wp-content/uploads/2019/06/Screen-Shot-2019-06-02-at-5.11.32-PM.png%3Fresize%3D450%252C476" alt="Identity Tables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That should be it! Run the project from Visual Studio and register a new user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
One thing I noticed when I was working with .NET Core was the missing Account controller that I was so used to seeing. Since .NET Core 2.1, all these pages are now part of the Razor class library. If you need access to these pages to modify the UI or change the backend code, you’ll need to scaffold them out. To do this you first need to install the code scaffolder:&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet tool install -g dotnet-aspnet-codegenerator&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Once installed, add the package to your project:&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 2.1.8&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet restore&lt;/code&gt;&lt;br&gt;&lt;br&gt;
You can omit &lt;code&gt;--version 2.1.8&lt;/code&gt; if you’re using the latest version of .NET Core. Now run the following command to list the pages you can add to your project.&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet aspnet-codegenerator identity --listFiles&lt;/code&gt;&lt;br&gt;&lt;br&gt;
You can pick and chose which files to expose in your project by running the following:&lt;br&gt;&lt;br&gt;
&lt;code&gt;dotnet aspnet-codegenerator identity --files="Account.Manage.ChangePassword;Account.Register;Account.ResetPassword;Account.ResetPasswordConfirmation"&lt;/code&gt;&lt;br&gt;&lt;br&gt;
You can now view all the identity files you chose under Area &amp;gt;&amp;gt; Identity &amp;gt;&amp;gt; Pages &amp;gt;&amp;gt; Account&lt;/p&gt;

</description>
      <category>net</category>
      <category>netcore</category>
      <category>identity</category>
      <category>macos</category>
    </item>
    <item>
      <title>Allow Multiple Email Addresses in a Lightning Input Component</title>
      <dc:creator>Jason</dc:creator>
      <pubDate>Mon, 19 Nov 2018 00:12:43 +0000</pubDate>
      <link>https://dev.to/ijason/allow-multiple-email-addresses-in-a-lightning-input-component-2mfk</link>
      <guid>https://dev.to/ijason/allow-multiple-email-addresses-in-a-lightning-input-component-2mfk</guid>
      <description>

&lt;p&gt;The &lt;a href="https://developer.salesforce.com/docs/component-library/bundle/lightning:input/example#lightningcomponentdemo:exampleInputEmail"&gt;lightning input component&lt;/a&gt; has built in support for emails which works great when you need to accept an email address as input.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;lightning:input aura:id="emailForm" label="To: " type="email"
                 name="toEmail"
                 value="{!v.toEmail}"
                 required="true"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This auto validates the input to ensure its in the correct format. The moment you add a semi-colon to add multiple emails, the validation fails. It only allows for one email input. To get around this you can’t use the email type. You have to use the text type and do the validation yourself using a regular expression like:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;lightning:input aura:id="emailForm" label="To: " type="text"
                 name="toEmail"
                 value="{!v.toEmail}"
                 required="true"
                 messageWhenPatternMismatch="Please enter a valid email or valid emails separated by a semi-colon"
                 pattern="^(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*$" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;With the snippet above, you can now accept multiple emails in a single input control. It’ll correctly validate whether you use a single email or multiple emails. If you can improve the regular expression, leave a comment below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Controller validation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You can further validate the input in your controller with this snippet:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var allValid = component.find('emailForm').reduce(function (validSoFar, inputCmp) {
     inputCmp.showHelpMessageIfInvalid();
     return validSoFar &amp;amp;&amp;amp; inputCmp.get('v.validity').valid;
}, true);
if (allValid) {
    //proceed
} else {
    //display error
    component.set("v.error", 'Please update the invalid form entries and try again.');
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




</description>
      <category>salesforce</category>
      <category>aura</category>
      <category>emailinput</category>
      <category>lightningcomponent</category>
    </item>
    <item>
      <title>For mobile app developers that use ads for revenue, how do you plan to comply with GDPR?</title>
      <dc:creator>Jason</dc:creator>
      <pubDate>Sat, 05 May 2018 22:21:51 +0000</pubDate>
      <link>https://dev.to/ijason/for-mobile-app-developers-that-use-ads-for-revenue-how-do-you-plan-to-comply-with-gdpr-2had</link>
      <guid>https://dev.to/ijason/for-mobile-app-developers-that-use-ads-for-revenue-how-do-you-plan-to-comply-with-gdpr-2had</guid>
      <description>&lt;p&gt;I've published a few iOS apps that use Admob to generate revenue.  With the EU cookie compliance laws going into effect on May 25th, what are mobile app developers doing to comply with the EU laws?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>mobileapps</category>
    </item>
    <item>
      <title>BigCommerce – Creating a WebHook</title>
      <dc:creator>Jason</dc:creator>
      <pubDate>Fri, 13 Apr 2018 19:34:38 +0000</pubDate>
      <link>https://dev.to/ijason/bigcommerce--creating-a-webhook-4j6o</link>
      <guid>https://dev.to/ijason/bigcommerce--creating-a-webhook-4j6o</guid>
      <description>

&lt;p&gt;I couldn’t find any reliable C# examples on how to create a webhook using BigCommerce’s API so I thought I’d share my solution. The example code below will create a webhook when an order is created in your BigCommerce store.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//BigCommerce Authorization
string clientID = "&amp;lt;your_client_id&amp;gt;";              
string token = "&amp;lt;your_token&amp;gt;";
string storeHash = "&amp;lt;your_store_hash&amp;gt;";
string resourcePath = "hooks";

string baseURL = "https://api.bigcommerce.com/stores/" + storeHash + "/v2/" + resourcePath;

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(baseURL);
req.AllowAutoRedirect = true;
req.ContentType = "application/json";
req.Accept = "application/json";
req.Method = "POST";

req.Headers.Add("X-Auth-Client", clientID);
req.Headers.Add("X-Auth-Token", token);             

//send scope and destination as json
using (var streamWriter = new StreamWriter(req.GetRequestStream()))
{
    string json = "{\"scope\":\"store/order/created\"," +
                  "\"destination\":\"https://app.example.com/orders\"}";

    streamWriter.Write(json);
    streamWriter.Flush();
    streamWriter.Close();
}

string jsonResponse = null;
using (WebResponse resp = req.GetResponse())
{
    if (req.HaveResponse &amp;amp;&amp;amp; resp != null)
    {
        using (var reader = new StreamReader(resp.GetResponseStream()))
        {
            jsonResponse = reader.ReadToEnd();
        }
    }
}

Response.Write(jsonResponse);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




</description>
      <category>net</category>
      <category>api</category>
      <category>bigcommerce</category>
      <category>c</category>
    </item>
  </channel>
</rss>
