This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Microsoft.Extensions.DependencyInjection; | |
using System.Reflection; | |
public static class TypesAssignableFromServiceCollectionExtensions | |
{ | |
/// <summary> | |
/// Adds all types assignable from TInterface in the assembly to the service collection. | |
/// </summary> | |
/// <typeparam name="TInterface">The interface to scan for.</typeparam> | |
/// <param name="services">The service collection.</param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global using Framework; | |
namespace Framework; | |
using System.Reflection; | |
public interface IEndpoint | |
{ | |
RouteHandlerBuilder Configure(IEndpointRouteBuilder builder); | |
} | |
public abstract record Endpoint(string[] Verbs, string Path) : IEndpoint | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NM=$1 | |
function create_setup() { | |
cat << EOF > setup-vm.sh | |
#!/bin/bash | |
function get_architecture() { | |
arch=\$(uname -m) | |
if [ \$arch == "x86_64" ]; then | |
echo "amd64" | |
elif [ \$arch == "aarch64" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.Metadata.Builders; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
namespace EfCoreVsRecords | |
{ | |
public record Item(Guid Id, string Name, bool IsDone) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fernando Escolar's configuration 2020-11-01 | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{75de88dc-a61a-4f9d-8f17-b820620e7163}", | |
"theme": "dark", | |
"copyOnSelect": false, | |
"copyFormatting": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# execute it as root | |
# update | |
apt-get update | |
apt-get install make gcc tcl | |
# download redis | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable |