Skip to content

Instantly share code, notes, and snippets.

View marshalhayes's full-sized avatar

Marshal Hayes marshalhayes

View GitHub Profile
@marshalhayes
marshalhayes / Tailwind.targets
Last active April 14, 2025 05:10
Using Tailwind the right way for .NET
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file exposes the following parameters -->
<!-- TailwindVersion: The version of the Tailwind Standalone CLI to download. -->
<!-- TailwindDownloadPath: The path to where to download the Tailwind Standalone CLI. This property is optional, and defaults to %LOCALAPPDATA% on Windows, and $XDG_CACHE_HOME on Linux and MacOS. -->
<!-- TailwindInputStyleSheetPath: The path to the input stylesheet. -->
<!-- TailwindOutputStyleSheetPath: The path to the output stylesheet. -->
<!-- TailwindOptimizeOutputStyleSheet: Whether to optimize the output stylesheet. This property is optional, and defaults to false. -->
<!-- TailwindMinifyOutputStyleSheet: Whether to minify the output stylesheet. This property is optional, and defaults to false when Configuration is Debug, and true when Configuration is Release. -->
<!-- TailwindDownloadUrl: The URL to the Tailwind Standalone CLI. This property is optional, and defau
@marshalhayes
marshalhayes / http-client.module.ts
Last active December 18, 2020 15:36
An extension of the Angular 11 HttpClient that provides a simple http response caching mechanism
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { CommonHttpClient } from './http-client.service';
@NgModule({
imports: [
HttpClientModule
],
providers: [
@marshalhayes
marshalhayes / README.md
Last active July 3, 2024 12:33
TLS encryption of Python sockets using the "SSL" module

README.md

Follow these steps before trying to run any code.

  1. First, generate a Certificate Authority (CA).

openssl genrsa -out rootCA.key 2048

  1. Second, self-sign it.
@marshalhayes
marshalhayes / grammar.g4
Last active July 14, 2018 00:07
An antlr4 grammar application of a C# abstract class which includes only abstract methods and variables
grammar AbstractClass;
prog : abstractclass;
abstractclass : visibility abstr clas CLASSNAME OPEN_BRACKET statement+ CLOSE_BRACKET;
visibility : ('public'|'protected'|'internal'|'private');
abstr : 'abstract';
clas : 'class';