In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.webServer> | |
<httpProtocol> | |
<customHeaders> | |
<add name="Access-Control-Allow-Origin" value="*"/> | |
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS"/> | |
<add name="Access-Control-Allow-Headers" value="Content-Type"/> | |
</customHeaders> | |
</httpProtocol> |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using AutoGuru.Client.Shared; | |
using AutoGuru.Client.Shared.Dtos; | |
using AutoGuru.Client.Shared.Models; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Logging; |
using System; | |
using System.Threading.Tasks; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Diagnostics; | |
using System.Net.Sockets; | |
namespace ConsolePortScanner | |
{ | |
class MainClass |
public class Pattern<TReturn> | |
: List<(Type Type, Func<object, TReturn> Map)> | |
{ | |
public void Add<T>(Func<T, TReturn> map) | |
=> Add((typeof(T), o => map((T)o))); | |
public Pattern<TReturn> Default(TReturn val) | |
{ | |
Add((object _) => val); | |
return this; |
You'll find the talks here
Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.
namespace MyApp.Web.Security | |
{ | |
using System; | |
using System.Configuration; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.Configuration; | |
public class MachineKeys | |
{ |
public static List<T> Query<T>(this DataContext db, string sql, object param = null, int? commandTimeout = null, IDbTransaction transaction = null, [CallerFilePath]string fromFile = null, [CallerLineNumber]int onLine = 0, string comment = null) | |
{ | |
using (db.Connection.EnsureOpen()) | |
{ | |
try | |
{ | |
return db.Connection.Query<T>(MarkSqlString(sql, fromFile, onLine, comment), param, transaction ?? db.Transaction, true, commandTimeout).AsDapperList(); | |
} | |
catch (SqlException ex) when (ex.Is(SqlErrorCode.DatabaseReadOnly_3906)) | |
{ |
using System.IO.Pipelines; | |
using System.Net; | |
using System.Net.Security; | |
using Microsoft.AspNetCore.Connections; | |
using Microsoft.AspNetCore.Connections.Features; | |
using Microsoft.AspNetCore.Http.Features; | |
using Microsoft.AspNetCore.Server.Kestrel.Core; | |
var builder = WebApplication.CreateBuilder(args); |
internal static class FormsAuthenticationTicketHelper | |
{ | |
private const byte CURRENT_TICKET_SERIALIZED_VERSION = 0x01; | |
private const int MAX_TICKET_LENGTH = 4096; | |
// Resurrects a FormsAuthenticationTicket from its serialized blob representation. | |
// The input blob must be unsigned and unencrypted. This function returns null if | |
// the serialized ticket format is invalid. The caller must also verify that the | |
// ticket is still valid, as this method doesn't check expiration. |