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 database in PostgreSQL | |
-- Apply this SQL to the dabase, using the command: | |
-- psql -d theDatabaseName -f TargetedRankRequirementsReport.sql | |
-- Import the Scoutbook exported troop roster into the scouts table first. | |
-- Import Scoutbook exported rank requirements into the rank_requirements table second. | |
-- Run various views to get "Reports". The view scout_requirements_targeted_all_scouts is probably of the most | |
-- interest and can be further filtered to target your needs. |
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
namespace Moq; | |
public static class ItExt | |
{ | |
public static T IsEquivalentTo<T>(T expected) | |
{ | |
// An inner function like this is called a local function, equivalent to Func<>() = ()=> ; | |
bool Validate(T actual) | |
{ | |
actual.Should().BeEquivalentTo(expected); |
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
namespace Moq; | |
public static class MatcherExtensions | |
{ | |
public static T[] CreateEnumerableMatcher<T>(this T[] expectation) | |
{ | |
return Match.Create<T[]>( | |
inputCollection => | |
{ | |
bool result = expectation.All(inputCollection.Contains); | |
return result; |
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
private _createVpcPeering() { | |
// Currently, the console shows a name attribute for the peering connection but no | |
// name is available in the peering connection properties. | |
this.vpcPeeringConnection = new CfnVPCPeeringConnection(this, 'PeerToLegacyVpc', { | |
vpcId: this.vpc.vpcId, | |
peerVpcId: this.legacyVpc.vpcId, | |
} | |
); | |
} |
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
# This will automatically install the Sumo Logic collector on AWS Elastic | |
# Beanstalk instances. Add this to the .ebextensions folder in your app root | |
# To add or remove tracked files, simply add or remove source hashes to the | |
# sources array. | |
packages: | |
rpm: | |
SumoCollector: https://collectors.sumologic.com/rest/download/rpm/64 | |
files: | |
"/home/ec2-user/setup-sumo.sh": |
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
// tslint:disable-next-line:no-any | |
export class PromiseResolver<T = any> { | |
private _resolve: (value?: T | PromiseLike<T>) => void; | |
// tslint:disable-next-line:no-any | |
private _reject: (reason?: any) => void; | |
// tslint:disable-next-line:no-any | |
public executor = (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => { | |
this._resolve = resolve; | |
this._reject = reject; |
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
db.someCollection.aggregate([ | |
{ | |
"$match":{ | |
"$text":{ | |
"$search":"boundary" | |
} | |
} | |
}, | |
{ | |
"$match":{ |
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 | |
set -e | |
set -x | |
export SOLUTIONNAME=${1:-"SolutionName"} | |
export FRAMEWORK=${2:-"netcoreapp2.2"} | |
export LANGVERSION=${3:-"7.3"} | |
add_project() { | |
if [[ "${1}" = "classlib" ]] |
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
<?xml version="1.0" encoding="utf-8"?> | |
<PerformanceReport> | |
<CallTreeSummary> | |
<CallTree Level="0" FunctionName="DataReaderDisposeCancelTest.exe" InclusiveElapsedTime="22,386.00" ExclusiveElapsedTime="0.00" InclusiveApplicationTime="0.51" ExclusiveApplicationTime="0.00" InclusiveElapsedTimePercent="100.00" ExclusiveElapsedTimePercent="0.00" InclusiveApplicationTimePercent="100.00" ExclusiveApplicationTimePercent="0.00" NumCalls="0" ModuleName="" /> | |
<CallTree Level="1" FunctionName="DataReaderDisposeCancelTest.Program.Main(string[])" InclusiveElapsedTime="22,386.00" ExclusiveElapsedTime="0.51" InclusiveApplicationTime="0.51" ExclusiveApplicationTime="0.00" InclusiveElapsedTimePercent="100.00" ExclusiveElapsedTimePercent="0.00" InclusiveApplicationTimePercent="100.00" ExclusiveApplicationTimePercent="0.35" NumCalls="1" ModuleName="DataReaderDisposeCancelTest.exe" /> | |
<CallTree Level="2" FunctionName="DataReaderDisposeCancelTest.Program.NoCancelTest(class System.Data.IDbCommand)" InclusiveElapsedTime= |
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
namespace DataReaderDisposeCancelTest | |
{ | |
using System; | |
using System.Configuration; | |
using System.Data; | |
using System.Data.Common; | |
internal class Program | |
{ | |
private const int iterations = 50; |