Skip to content

Instantly share code, notes, and snippets.

View latkin's full-sized avatar

Lincoln Atkinson latkin

View GitHub Profile
@latkin
latkin / regexinfo.ps1
Last active April 1, 2022 01:43
Regex matching helper
<#
Dumps capture group locations and names/numbers
Example:
> regexinfo 'Jenny: 555-867-5309' '(?<name>\w+):\s+(?<phone>(?:(?<area>\d{3})-)?(\d{3}-\d{4}))'
[Jenny]: [[555]-[867-5309]]
| || |
| || 1
| |area
| phone
@latkin
latkin / table.md
Last active January 21, 2023 21:29
JNI Object Lifetimes Quick Reference
Yes
JNI Object Use across JNI calls? Use on different thread? Notes
JavaVM
@latkin
latkin / NativeMethods.fs
Created February 22, 2016 19:46
F# p/invoke example with structs
namespace Test
open System.Runtime.InteropServices
// F# implementation of http://pinvoke.net/default.aspx/mpr.WNetAddConnection2
module NativeMethods =
type ResourceScope =
| Connected = 0x1u
| GlobalNet = 0x2u