I hereby claim:
- I am jpmikkers on github.
- I am jpmikkers (https://keybase.io/jpmikkers) on keybase.
- I have a public key ASA2O9WXA2m3Bij_0CvXwmgnuVY4cCbiqRKbGa3Py177RQo
To claim this, I am signing this object:
Verifying that I control the following Nostr public key: npub1t7uc9qtrtj8ll8ys67lhsnkn35xn6q8f9phs5rv058asamacsnnqwztra0 |
public static class IEnumerableExtensions | |
{ | |
[Pure] | |
public static IEnumerable<T> NotNull<T>(this IEnumerable<T?> enumerable) where T : class | |
=> enumerable.Where(e => e is not null).Select(e => e!); | |
[Pure] | |
public static IEnumerable<T> NotNull<T>(this IEnumerable<T?> enumerable) where T : struct | |
=> enumerable.Where(e => e.HasValue).Select(e => e!.Value); | |
} |
$gateway = '192.168.1.1' # this should be the ip address of your router, presumably that is reasonably constant for most systems. | |
$baseadapter = Get-NetIPConfiguration | | |
where { $_.IPv4DefaultGateway.NextHop -eq $gateway} | | |
select -First 1 | Get-NetAdapter | |
if($baseadapter -eq $null) | |
{ | |
throw "Could not find base adapter" | |
} |
<# | |
.SYNOPSIS | |
Time-base One-Time Password Algorithm (RFC 6238) | |
.DESCRIPTION | |
This is an implementation of the RFC 6238 Time-Based One-Time Password Algorithm draft | |
based upon the HMAC-based One-Time Password (HOTP) algorithm (RFC 4226). This is a time | |
based variant of the HOTP algorithm providing short-lived OTP values. | |
#> |
/// <summary> | |
/// Given two circles with known positions and radii, and one circle of known radius and unknown position, | |
/// calculate the position of the third circle so it exactly touches the other circles. | |
/// </summary> | |
/// <param name="x1">x coordinate of circle 1</param> | |
/// <param name="y1">y coordinate of circle 1</param> | |
/// <param name="r1">radius of circle 1</param> | |
/// <param name="x2">x coordinate of circle 2</param> | |
/// <param name="y2">y coordinate of circle 2</param> | |
/// <param name="r2">radius of circle 2</param> |
I hereby claim:
To claim this, I am signing this object:
http://stackoverflow.com/questions/2094694/how-can-i-run-powershell-with-the-net-4-runtime | |
https://gist.github.com/jstangroome/882528 |
// see http://people.cs.uct.ac.za/~ksmith/articles/sliding_window_minimum.html | |
public class SlidingWindowMinimum<T> where T : IComparable | |
{ | |
private struct Item | |
{ | |
public long TimeStamp; | |
public T Value; | |
} | |
private long m_Counter; |
/* | |
Copyright (c) 2015 Jean-Paul Mikkers | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
/* | |
Copyright (c) 2015 Jean-Paul Mikkers | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |