Skip to content

Instantly share code, notes, and snippets.

View webprofusion-chrisc's full-sized avatar

Christopher Cook webprofusion-chrisc

View GitHub Profile
/// <summary>
/// See https://developers.google.com/maps/documentation/utilities/polylinealgorithm
/// </summary>
public static class GooglePoints
{
/// <summary>
/// Decode google style polyline coordinates.
/// </summary>
/// <param name="encodedPoints"></param>
/// <returns></returns>
@webprofusion-chrisc
webprofusion-chrisc / launch.json
Last active May 13, 2018 21:40
Debugging an Ionic 2 app using Visual Studio Code
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach Ionic 2 App with sourcemaps",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"url": "http://localhost:8100/"
@webprofusion-chrisc
webprofusion-chrisc / NuGet-performance.md
Last active September 1, 2021 05:06
Example NuGet performance in Visual Studio 2022 for medium sized solution.

Environment: Windows 11, 16GB Ram, Processor Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz, 3201 Mhz, 6 Core(s), 12 Logical Processor(s) Internet: 66Mbps down, 20Mbps up. 23ms latency (fast.com). HTTP requests measured using Fiddler.

Solution: 43 projects (including projects for tests, plugins etc). NuGet configured for one package source (nuget.org). This is a private solution but you can test roughly half of the same solution by cloning https://github.com/webprofusion/certify and opening Certify.Core.Service.sln

Variously targetting .net 4.6.2, .net standard, .net5

Opening "manage nuget for solution" performs 802 api.nuget.org requests:

@webprofusion-chrisc
webprofusion-chrisc / validate-cert-and-key.md
Last active May 8, 2024 08:21
Checking a cert and private key match using OpenSSL, the right way

If you google how to validate a cert and private key match most examples are RSA specific and use modulus output.

Those examples look something like: openssl x509 -in cert.pem -noout -modulus | openssl sha1

Instead use the proper OpenSSL public key support:

  • Check public key of certificate: openssl x509 -noout -pubkey -in cert.pem
  • Check public key based on private key: openssl pkey -pubout -in key.pem