Generation of a self-signed SSL certificate involves a simple 3-step procedure:
STEP 1: Create the server private key
openssl genrsa -out cert.key 2048STEP 2: Create the certificate signing request (CSR)
openssl req -new -key cert.key -out cert.csr| public class DataContext : DbContext { | |
| private static readonly Lazy<Action<ModelBuilder>> EntityConfigurationApplier = | |
| new Lazy<Action<ModelBuilder>>( | |
| () => EntityConfigurationsApplier.CreateAutoApplierBuilder(typeof(DataContext)) | |
| ); | |
| protected override void OnModelCreating( | |
| ModelBuilder modelBuilder | |
| ) | |
| { |
| /* | |
| * MIT License | |
| * | |
| * Copyright (c) 2023-2024 Fabio Lima | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
Let's say we can a blog hosted as Wordpress.com but visible on our custom domain in subpath due to SEO. WordPress.com supports changing domain/subdomain but not path.
We could either make our own installation, change hosting provier or make nginx proxy with URL rewrites.
This tutorial is inpsired by http://marsbard.github.io/2016-07-30-replace-urls-behind-nginx-reverse-proxy/.
win-bash
I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin master |
| /* | |
| * Based on: http://www.quirksmode.org/js/cookies.html | |
| * and https://github.com/wojodesign/local-storage-js/blob/master/storage.js | |
| * and https://gist.github.com/350433 | |
| * License: http://www.opensource.org/licenses/MIT | |
| */ | |
| (function(window) { | |
| 'use strict'; | |
| window.sessionStorage = window.sessionStorage || { |
| #region Imports | |
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| #endregion | |