Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Zeitler AlexZeitler

View GitHub Profile
@AlexZeitler
AlexZeitler / main.yml
Created Jan 10, 2021
.NET Core GitHub Action Template
View main.yml
name: .NET Core Build with Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
@AlexZeitler
AlexZeitler / Readme.md
Created Jan 4, 2021 — forked from skorfmann/Readme.md
Stub Lambda Functions in your CDK Stack
View Readme.md

Stubbing Lambda Functions in your CDK Stack

Given you have a stack with one or more Lambda functions (e.g. as part of a Step Functions state machine), it can be pretty useful to stub long running parts with a known response.

This makes use of cdk Aspects, which allows modifying all or a filtered subsset of resources for a given scope (Stack, Construct).

In addition this leverages raw overrides to remove the original code of the Lambda function.

Please note, that the stub has to be in Python or NodeJS, since inlining code is only supported by those runtimes.

@AlexZeitler
AlexZeitler / event-sourced-user.fsx
Created Dec 29, 2020 — forked from akhansari/event-sourced-user.fsx
F# : Event Sourcing in a nutshell
View event-sourced-user.fsx
// ========= Event Sourcing in a nutshell
(*
FriendlyName: string
Aggregate friendly name.
Initial: 'State
Initial (empty) state we will start with.
Decide: 'Command -> 'State -> 'Event list
View check if required tool can be executed
function check_required_software() {
ERROR=""
! [ -x "$(command -v curl)" ] && ERROR="$ERROR- curl\n"
! [ -x "$(command -v jq)" ] && ERROR="$ERROR- jq\n"
if [ -n "$ERROR" ]; then
echo "Some software is missing to run this script."
echo "Please make sure that you've installed:"
echo $ERROR >&2
View PropertyExpression.ts
type Person = {
firstName: string
lastName: string
middleName?: string
}
const hasValue = (value: Record<string, any>, property: any): boolean =>
Boolean(value[property])
type ValueOf<T> = T[keyof T]
@AlexZeitler
AlexZeitler / App.fs
Created Jun 12, 2020 — forked from aspnetde/App.fs
Feliz – MVU with React Function Components
View App.fs
module App
open Elmish
type State =
{ CurrentUser: string option }
type Msg =
| SignIn of string
| SignOut
View Oh my zsh with autosuggestions & syntax-highlighting.md

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
View keybase.md

Keybase proof

I hereby claim:

  • I am alexzeitler on github.
  • I am alexzeitler (https://keybase.io/alexzeitler) on keybase.
  • I have a public key ASB0qww7uSPAMkQCwMlF3wDCa-RQCliGbSSl4H7W1nx9yAo

To claim this, I am signing this object:

@AlexZeitler
AlexZeitler / siren_api.yml
Created Sep 20, 2019 — forked from kevinswiber/siren_api.yml
Siren definitions for Open API Specification
View siren_api.yml
swagger: '2.0'
info:
title: Siren API
description: Template for a Siren API
version: '0.1.0'
schemes:
- http
- https
basePath: /
produces:
View nginx_to_iis.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
You can’t perform that action at this time.