Skip to content

Instantly share code, notes, and snippets.

View derek-baker's full-sized avatar
🏠
Working from home

Derek Baker derek-baker

🏠
Working from home
View GitHub Profile
@derek-baker
derek-baker / effective-fsharp.md
Created July 23, 2022 18:51 — forked from swlaschin/effective-fsharp.md
Effective F#, tips and tricks

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
  • Keep IO at edges

param(
[Parameter(mandatory=$true)]
$apiUrl, # EX: 'https://<ProductionAppDomain>/api/v1.0/bulkupload/postgrievance',
[Parameter(mandatory=$true)]
$apiKey, # EX 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
[Parameter(mandatory=$true)]
$repEmail,
"use strict";
if (window.cordova && cordova.platformId !== "browser") {
document.addEventListener("deviceready", function () {
document.addEventListener("click", function (e) {
var elem = e.target;
while (elem != document) {
if (elem.tagName === "A" && elem.hasAttribute("download")) {
e.preventDefault();
@derek-baker
derek-baker / AttachSignatureToPdf.txt
Last active June 22, 2020 21:26
Steps in Adobe Acrobat to create a button that allows a user to upload an image (which can be a signature)
Open up the Content Panel via Tools > Content Panel
Using the 'Add a button' tool(top-center, immediately above the doc) draw a button to the size the image field needs to be
Double click the button to enter into the button's properties
Go to the Actions tab
Next to Select Action choose 'Run a JavaScript'
#!/bin/bash
## Script makes http requests to specified endpoints and build an error message in response
## to non-200 return codes, then emails that message if it has a length greater than 0.
alert_recipient="<AlertEmail>"
urls='https://www.someurl.com/ https://www.someurl.com/test'
error_msg=""