Skip to content

Instantly share code, notes, and snippets.

View marshalhayes's full-sized avatar
:octocat:
Coding things I'm passionate about!

Marshal Hayes marshalhayes

:octocat:
Coding things I'm passionate about!
View GitHub Profile
@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';
@marshalhayes
marshalhayes / README.md
Last active June 2, 2024 15:57
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 / 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: [