Skip to content

Instantly share code, notes, and snippets.

View Jonesie's full-sized avatar
🏠
Working from home

Peter G Jones Jonesie

🏠
Working from home
  • New Zealand
View GitHub Profile
#requires -version 2.0
[CmdletBinding()]
param (
[parameter(Mandatory=$true)]
[ValidatePattern('\.rptproj$')]
[ValidateScript({ Test-Path -PathType Leaf -Path $_ })]
[string]
$Path,
[parameter(
@Jonesie
Jonesie / DateTimeOffsetTypeConverter.cs
Last active October 18, 2021 21:05
A small collection of type converter that are used to map types in and out of DynamoDB items.
using Amazon.DynamoDBv2.DataModel;
using Amazon.DynamoDBv2.DocumentModel;
using System;
namespace barXui.Models.Data.Dynamo
{
public class DateTimeOffsetTypeConverter : IPropertyConverter
{
public object FromEntry(DynamoDBEntry entry)
{
@Jonesie
Jonesie / BitmapExtensions.cs
Last active December 5, 2021 20:09
SKBitmap Crop Whitespace
using SkiaSharp;
using System;
//
// Based on the original stackoverflow post: https://stackoverflow.com/questions/248141/remove-surrounding-whitespace-from-an-image
//
namespace BlahBlah
{
public static class BitmapExtensions