Mac: Turn off insert key in remote desktop or Parallels virtual machine
If you are running Windows in VMWare or Remote Desktop and the insert key is on: To turn off there a couple of possible options:
Try Pressing: fn + 0 NOTE: 0 of the right number keypad
or
Try Pressing: shift + fn + 0 . NOTE: 0 of the right number keypad
Windows: Generate SSH Keys
There are several way to generate SSH Keys. This example uses just ssh-keygen
ssh-keygen -t rsa -b 2048
Then you can find the generated key
C:\> cd %HomePath%/.ssh
Reference: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows
Open Terminal and type:
$ ssh-keygen -t rsa -b 4096 -C "yourname@yourdomain.com"
Use the defaults by pressing enter.. Generic Example:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/john.doe/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/john.doe/.ssh/id_rsa.
Your public key has been saved in /Users/john.doe/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:s/NA0e62g1zjEmAtUIi42/cEEicAGVs+fDcuAtOFlrY john.doe@doeinc.com
The key's randomart image is:
+---[RSA 4096]----+
| .o+o+oo.|
| o+o.+oo.=|
| . o+.+=+++|
| o o++++.|
| .S. ..*o.o|
| o=o.o+.. |
| o.o.+E* |
| ++.++ o |
| .++.. +|
+----[SHA256]-----+
Change to .ssh directory
$ cd ~/.ssh/id_rsa
Open the public key
$ nano ~/.ssh/id_rsa.pub
Copy all the text
Open Github.com
Go to Settings (Upper right avatar icon)
Choose SSH and GPG Keys
Click "New SSH Key"
Paste your key into the text area and give it a name.
Click "Save"
From bash:
Run the
$ rm -rf ~/Library/Caches/XamarinInstaller/Universal
Rerun the Mac Visual Studio installer.
Change of Email on Github causes Mac Bash Permissions Connection Issue
If you change your email on Github it will cause your previously saved Github credentials on Mac to become invalid because it was cached in the Keychain Access. When you try to connect to github, it thinks the password is valid and tries to use it for your Github access. You'll need to delete it.
Solution:
Make sure to change your local git config global user.email
$ git config --global user.email "your.email@domain.com"
Just go to Keychain Access (Command + Space) and type Keychain Access.
Find the github.com name in the list where kind is Internet Password and delete it.
From command again try connecting to Github and should prompt you for the updated password associated to the new email.
Entity Framework Error:
Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Migrations.IMigrator'. This is often because no database provider has been configured for this DbContext. A provider can be configured by overriding the DbContext.OnConfiguring method or by using AddDbContext on the application service provider. If AddDbContext is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext.
Solution:
Verify the connectionstring in the appsettings.json file.
{
"ConnectionStrings": {
"CustomerDb": "Server=(localdb)\\mssqllocaldb;Database=Customer;Trusted_Connection=True;"
}
}
On Startup.cs, ConfigureService method, verify, you are correctly initializing the Context
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
});
services.AddDbContext<AppDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("CustomerDb")));
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}
How To: Unobtrusive Javascript - Manually Add/Remove Required Rule and Message.
<script type="text/javascript">
$(function () {
var addRequired = function () {
// Manually add required fields to certain fields
$('#scheduledLockDate').rules('add', {
required: true,
messages: {
required: "The Scheduled Lock Date is required"
}
});
$('#scheduledDisposeDate').rules('add', {
required: true,
messages: {
required: "The Scheduled Dispose Date is required"
}
});
$('#issueDate').rules('add', {
required: true,
messages: {
required: "The Issue Date is required"
}
});
}
// This will remove the manually required fields
var removeRequired = function () {
// Manually remove required fields to certain controls
$('#scheduledLockDate').rules('remove', 'required');
$('#scheduledDisposeDate').rules('remove', 'required');
$('#issueDate').rules('remove', 'required');
}
// Handle the form submit method
$('#workspaceForm').submit(function (e) {
e.preventDefault();
var form = this;
// Trigger Form Validation
var isValid = $('#workspaceForm').valid();
if (!isValid) {
// Exit out
return false;
}
form.submit();
});
//Manually add the required fields
addRequired();
//Manually remvoe the required fields
removeRequired();
});
</script>
Reference: https://jqueryvalidation.org/rules/
Goto: https://console.developers.google.com/apis/dashboard
Choose your domain from the top navigation dropdown
Then
Goto: https://console.developers.google.com/apis/library
Choose your domain from the top navigation dropdown
Not all these API are required, I just added few more for helpfulness
Enable the following:
- Maps Javascript API
- Maps Embed API
- Directions API
- Places API
- Geocoding API
- Geolocation API
Choose Restrictions
Choose Referers
Enter the urls:
localhost/*
*.yourwebsite.com/*
yourwebsite.com/*
yourwebsite.azurewebsites.net/*
https://github.com/loggly/log4net-loggly/#net-core-support