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
if test -d src; then | |
rm -rf src | |
fi | |
while getopts n: flag | |
do | |
case "${flag}" in | |
n) projectName=${OPTARG};; | |
esac | |
done |
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
builder.Services.AddSwaggerGen(options => | |
{ | |
options.SchemaFilter<SwaggerExcludeFilter>(); | |
options.DocumentFilter<SwaggerExcludeFilter>(); | |
}); |
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
const deepDiff = (local, remote, prefix = "") => { | |
let diff = []; | |
if (local === null && remote === null) return diff; | |
if (local === null || remote === null) { | |
let lnull = (local === null) ? "null" : typeof (local); | |
let rnull = (remote === null) ? "null" : typeof (remote); | |
diff.push(`${prefix} (null): local is ${lnull} and remote is ${rnull}`); | |
return diff; |
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.Diagnostics.CodeAnalysis; | |
namespace SampleApplication.Api | |
{ | |
[ExcludeFromCodeCoverage] | |
public static class Program | |
{ | |
private const string DefaultSettingsFile = "appsettings.json"; | |
private static IConfiguration _configuration; | |
private static IConfiguration _loggerOptions; |
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.Net.Http.Headers; | |
public interface IExampleClient | |
{ | |
/* interface methods here */ | |
} | |
public class ExampleClient : IExampleClient | |
{ | |
public static string AccessToken { get; set; } |
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
<script> | |
var myIFrame = document.querySelector('#myiframe'); | |
var myUrl = 'http://localhost:1234/api/test'; | |
var myHeaders = [ | |
['Authorization', 'Bearer 1234567890'] | |
]; | |
populateIFrame(myIFrame, myUrl, myHeaders); | |
function populateIFrame(iframe, url, headers) |
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 System.Reflection; | |
using System.Linq; | |
namespace DelegateTesting | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) |
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 System.Globalization; | |
using System.Runtime.Serialization; | |
using System.Xml; | |
using System.Xml.Schema; | |
using System.Xml.Serialization; | |
namespace Sandbox | |
{ |
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 class ParagraphBuilder | |
{ | |
public const int DefaultColumns = 86; | |
private string _input; | |
private int _columns; | |
private int _remaining; | |
private List<string> _output = new List<string>(); | |
private List<string> _line = new List<string>(); |
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
void Main() | |
{ | |
var dir = @"Y:\Downloads\My Books\"; | |
var filepaths = Directory.GetFiles(dir, "*.pdf", SearchOption.TopDirectoryOnly); | |
var pattern = @"^\d{13}\-(\w+)\.pdf$"; | |
var regex = new Regex(pattern); | |
foreach (var filepath in filepaths) | |
{ | |
var filename = Path.GetFileName(filepath); |
NewerOlder