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
OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317 |
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.Security.Cryptography; | |
public static class BetterPasswordHasher | |
{ | |
// Always use distinct version IDs for new versions, ideally by incrementing the highest version ID. | |
private const byte VersionId1 = 0x01; | |
private const byte VersionId2 = 0x02; | |
private const byte DefaultVersionId = VersionId2; |
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
var options = new MongoRunnerOptions | |
{ | |
UseSingleNodeReplicaSet = true, | |
StandardOuputLogger = Console.WriteLine, | |
StandardErrorLogger = Console.WriteLine, | |
}; | |
using (var runner = MongoRunner.Run(options)) | |
{ | |
var database = new MongoClient(runner.ConnectionString).GetDatabase("mydb"); |
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
# Create a branch policy in Azure Repos to protect your main branch | |
trigger: none | |
schedules: | |
- cron: "28 5 * * 6" | |
displayName: "Weekly run" | |
branches: | |
include: ["main", "master"] | |
always: 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
using EphemeralMongo; | |
public static class MongoRunnerProvider | |
{ | |
private static readonly object _lockObj = new object(); | |
private static IMongoRunner? _runner; | |
private static int _useCounter; | |
public static IMongoRunner Get() | |
{ |
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.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Configuration.AzureAppConfiguration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.FeatureManagement; |
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.Threading.Tasks; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Columns; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Reports; | |
using BenchmarkDotNet.Running; | |
var benchmarkOptions = DefaultConfig.Instance.WithSummaryStyle(SummaryStyle.Default.WithRatioStyle(RatioStyle.Trend)); | |
_ = BenchmarkRunner.Run<AwaitBenchmarks>(benchmarkOptions); |
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.Concurrent; | |
using System.Reflection; | |
using System.Threading.Tasks; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Columns; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Order; | |
using BenchmarkDotNet.Reports; | |
using BenchmarkDotNet.Running; |
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
import profiler from './screeps-profiler'; | |
export function profile(target: Function): void; | |
export function profile(target: object, key: string | symbol, _descriptor: TypedPropertyDescriptor<Function>): void; | |
export default function profile(target: object | Function, key?: string | symbol, _descriptor?: TypedPropertyDescriptor<Function>): void { | |
if (typeof profiler === 'undefined') { | |
return; | |
} | |
if (key) { |
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
// ==UserScript== | |
// @name Zendesk Comment Permalinks | |
// @namespace GSoft | |
// @description Adds new navigation capabilities to Zendesk | |
// @version 2.0.0 | |
// @match https://*.zendesk.com/agent/* | |
// @grant none | |
// ==/UserScript== | |
/******/ (function(modules) { // webpackBootstrap |
NewerOlder