This file contains 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 System; | |
using System.Collections.Generic; | |
using Newtonsoft.Json; | |
namespace WhiteBorad | |
{ | |
public class Program | |
{ | |
private static int _ContinueStringLength = 5; | |
public static Commit GetDiff(string sourceString, string targetString) |
This file contains 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
Server=(localdb)\\mssqllocaldb;Database=aspnet-MyApp-C54B83E0-93D8-47E7-B98D-C9596AF7DDC3;Trusted_Connection=True;MultipleActiveResultSets=true |
This file contains 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
public static class AsyncHelper | |
{ | |
private static readonly TaskFactory _taskFactory = new | |
TaskFactory(CancellationToken.None, | |
TaskCreationOptions.None, | |
TaskContinuationOptions.None, | |
TaskScheduler.Default); | |
public static TResult RunSync<TResult>(Func<Task<TResult>> func) | |
=> _taskFactory |
This file contains 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
public static IWebHost MigrateDbContext<TContext>(this IWebHost webHost, Action<TContext, IServiceProvider> seeder = null) where TContext : DbContext | |
{ | |
using (var scope = webHost.Services.CreateScope()) | |
{ | |
var services = scope.ServiceProvider; | |
var logger = services.GetRequiredService<ILogger<TContext>>(); | |
var context = services.GetService<TContext>(); | |
var configuration = services.GetService<IConfiguration>(); | |
var env = services.GetService<IHostingEnvironment>(); |
This file contains 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 Newtonsoft.Json; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
namespace Generator | |
{ | |
public abstract class Conversation |
This file contains 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.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Filters; | |
using System; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Text; | |
namespace Aiursoft.Pylon.Attributes | |
{ | |
public class LimitPerMin : ActionFilterAttribute |
This file contains 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
# Variables | |
$DiskID = "/subscriptions/e82a2bbd-7d7c-4fa7-ad47-bc0feef07aa1/resourceGroups/Anduin/providers/Microsoft.Compute/disks/StarDiskWithOS"# eg. "/subscriptions/203bdbf0-69bd-1a12-a894-a826cf0a34c8/resourcegroups/rg-server1-prod-1/providers/Microsoft.Compute/disks/Server1-Server1" | |
$VMName = "StarX" | |
$DiskSizeGB = 90 | |
$AzSubscription = "Visual Studio Enterprise – MPN" | |
# Script | |
# Provide your Azure admin credentials | |
Connect-AzAccount |
This file contains 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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>capture microphone audio into buffer</title> | |
<script type="text/javascript"> | |
var audioContext = new AudioContext(); | |
if (navigator.getUserMedia) { |
This file contains 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
#!/bin/bash | |
# | |
# Script migración desde Fontawesome v4 a Fontawesome v5 | |
# | |
# Modo de uso | |
# ./fontawesome4to5.sh [-d DIRECTORIO] [-e EXTENSION] [-v] | |
# | |
# Si no se especifica DIRECTORIO, se hará el reemplazo en el directorio actual | |
# Si no se especifica EXTENSION, se buscarán por defecto archivos "php" | |
# Opción -v mostrará los archivos que se van modificando |
This file contains 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
New-Item -Path "C:\Temp" -Type Directory | |
Dism /Mount-Image /ImageFile:"E:\sources\boot.wim" /Index:2 /MountDir:"C:\Temp" | |
$cabs = Get-ChildItem "*.cab" -Path "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs" | |
foreach($cab in $cabs) { | |
Dism /Add-Package /Image:"C:\Temp" /PackagePath:"$($cab.VersionInfo.FileName)" | |
} | |
$cabs = Get-ChildItem "*.cab" -Path "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us" | |
foreach($cab in $cabs) { |
OlderNewer