Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Nilay Vishwakarma iwannabebot

🎯
Focusing
View GitHub Profile
@iwannabebot
iwannabebot / ThumbnailFunction.cs
Created Oct 8, 2019
GcImaging ThumbnailFunction
View ThumbnailFunction.cs
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(
@iwannabebot
iwannabebot / xrm-meta-models.ts
Last active Feb 8, 2019
XRM Metadata SDK in TypeScript
View xrm-meta-models.ts
export interface XrmMetaAttribute {
LogicalName: string;
MetadataId: string;
DisplayName: DisplayName;
Description: Description;
IsCustomizable: IsCustomizable;
IsAuditEnabled: IsAuditEnabled;
OptionsSet: any;
AttributeType: string;
HasChanged?: any;
@iwannabebot
iwannabebot / AWSLambdaFunction.cs
Created Dec 24, 2018
AWS Lambda Template Function
View AWSLambdaFunction.cs
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 / MimeService.cs
Last active Dec 24, 2018
A C# utility class that gives your the Mime type from the file extension.
View MimeService.cs
using System;
using System.Collections.Generic;
using System.Web;
namespace Iwannabebot.Utility.Web
{
public class MimeService
{
public static string Get(string extension)
{
View GCImagingAWSLambdaS3.cs
public async Task<string> FunctionHandler(S3Event evnt, ILambdaContext context)
{
var s3Event = evnt.Records?[0].S3;
if(s3Event == null)
{
return null;
}
try
{
View GcImagingOperations.cs
using System;
using System.IO;
using System.Drawing;
using GrapeCity.Documents.Drawing;
using GrapeCity.Documents.Text;
using GrapeCity.Documents.Imaging;
namespace GCImagingAWSLambdaS3
{
public class GcImagingOperations
{
@iwannabebot
iwannabebot / UIHelper.cs
Created Oct 17, 2018
Search a WPF control hierarchy for controls that match a given name or type
View UIHelper.cs
/// <summary>
/// Finds a Child of a given item in the visual tree.
/// </summary>
/// <param name="parent">A direct parent of the queried item.</param>
/// <typeparam name="T">The type of the queried item.</typeparam>
/// <param name="childName">x:Name or Name of child. </param>
/// <returns>The first parent item that matches the submitted type parameter.
/// If not matching item can be found,
/// a null parent is being returned.</returns>
/// Usage:
@iwannabebot
iwannabebot / UpdateLayout.cshtml
Created Sep 10, 2018
You can optionally include Material Icons in your application:
View UpdateLayout.cshtml
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
@iwannabebot
iwannabebot / UpdateLayout.cshtml
Created Sep 10, 2018
Use our theme builder to decide some colour combinations. After deciding some arbitrary colour combination, you would be provided with a code to include in your layout page.
View UpdateLayout.cshtml
<link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.deep_purple-pink.min.css">
<link rel="stylesheet" href="http://cdn.wijmo.com/5.latest/styles/themes/material/wijmo.theme.material.deep_purple-pink.min.css" />
@iwannabebot
iwannabebot / UpdateLayout.cshtml
Created Sep 10, 2018
Include the Material Lite JavaScript file in _Layout page of your application.
View UpdateLayout.cshtml
<script defer src="https://code.getmdl.io/1.1.1/material.min.js"></script>
You can’t perform that action at this time.