Skip to content

Instantly share code, notes, and snippets.

@iwannabebot
iwannabebot / GCImagingAWSLambdaS3.cs
Last active December 26, 2018 06:05
GCImagingAWSLambdaS3
public async Task<string> FunctionHandler(S3Event evnt, ILambdaContext context)
{
var s3Event = evnt.Records?[0].S3;
if(s3Event == null)
{
return null;
}
try
{
@iwannabebot
iwannabebot / MimeService.cs
Last active December 24, 2018 05:29
A C# utility class that gives your the Mime type from the file extension.
using System;
using System.Collections.Generic;
using System.Web;
namespace Iwannabebot.Utility.Web
{
public class MimeService
{
public static string Get(string extension)
{
@iwannabebot
iwannabebot / AWSLambdaFunction.cs
Created December 24, 2018 06:58
AWS Lambda Template Function
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.S3Events;
using Amazon.S3;
using Amazon.S3.Util;
@iwannabebot
iwannabebot / xrm-meta-models.ts
Last active February 8, 2019 13:56
XRM Metadata SDK in TypeScript
export interface XrmMetaAttribute {
LogicalName: string;
MetadataId: string;
DisplayName: DisplayName;
Description: Description;
IsCustomizable: IsCustomizable;
IsAuditEnabled: IsAuditEnabled;
OptionsSet: any;
AttributeType: string;
HasChanged?: any;
@iwannabebot
iwannabebot / ThumbnailFunction.cs
Created October 8, 2019 13:35
GcImaging ThumbnailFunction
using System.IO;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
namespace GrapeCity.Documents.Imaging.FunctionsV2
{
public static class ThumbnailFunction
{
[FunctionName("ThumbnailFunction")]
public static void Run(