Skip to content

Instantly share code, notes, and snippets.

View mcdurdin's full-sized avatar

Marc Durdin mcdurdin

View GitHub Profile
@mcdurdin
mcdurdin / git-diff-grep.sh
Created June 6, 2023 07:22
Script to search git diffs, returning only lines that have changed, and the corresponding files
#!/usr/bin/env bash
# Adapted from https://stackoverflow.com/a/50569950/1836776
if [[ $1 == '--help' ]]; then
script=`basename "$0"`
echo "USAGE"
echo " $script term [git diff parameters]"
echo
echo "DESCRIPTION"
echo " Searches git diff results for <term>, returning only lines that have changed"
sample scroll issue

canadian_ms keyboard source

Provided as-is, without warranty or support.

MIT license.

@mcdurdin
mcdurdin / sample.txt
Created July 19, 2021 20:43
User Testing samples
sample
************* Path validation summary **************
Response Time (ms) Location
Deferred srv*c:\symbols*https://msdl.microsoft.com/download/symbols
Symbol search path is: srv*c:\symbols*https://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00007ff7`9fd60000 00007ff7`a01d9000 C:\Windows\Explorer.EXE
ModLoad: 00007ffc`28370000 00007ffc`28565000 C:\Windows\SYSTEM32\ntdll.dll
ModLoad: 00007ffc`26e40000 00007ffc`26efd000 C:\Windows\System32\KERNEL32.DLL
ModLoad: 00007ffc`25c30000 00007ffc`25ef8000 C:\Windows\System32\KERNELBASE.dll
ModLoad: 00007ffc`25b90000 00007ffc`25c2d000 C:\Windows\System32\msvcp_win.dll
{
"$schema": "http://json-schema.org/schema#",
"$ref": "#/definitions/langtags",
"definitions": {
"langtags": {
"type": "array",
"items": { "oneOf": [
{"$ref": "#/definitions/langtag"},
{"$ref": "#/definitions/_globalvar"},
{"$ref": "#/definitions/_phonvar"},
@mcdurdin
mcdurdin / strava-giro-graph.js
Last active May 27, 2022 00:04
Strava Giro-style elevation graph bookmarklet
var stravaOnSteroids = {
lengthMultiplierLarge : 0.001,
lengthMultiplierSmall : 1,
lengthUnitLarge:"km",
lengthUnitSmall:"m",
segName:'ride',
sections : [],
isRoute : false,
@mcdurdin
mcdurdin / kex_cryptoapi_cng.cpp
Last active October 29, 2019 09:05
RSA Key Exchange between CryptoAPI and CNG
/*
Example program to demonstrate sharing public keys from CryptoApi to CNG
Note: Reversing the process would allow sharing public keys from CNG to
CryptoApi. You would need to be careful of padding parameters and
versions.
License (yes, yes, BSD):
Copyright (c) 2013, Marc Durdin