A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'
// 1. pure, don't think about IO at all | |
module Domain = | |
let add x y = x + y | |
// 2. think about IO but not its implementation | |
module App = | |
let add (getX: unit -> Async<int32>) y = | |
async { | |
let! x = getX () | |
return Domain.add x y |
// ========= Event Sourcing in a nutshell | |
(* | |
FriendlyName: string | |
Aggregate friendly name. | |
Initial: 'State | |
Initial (empty) state we will start with. | |
Decide: 'Command -> 'State -> 'Event list |
using System; | |
using System.Runtime.CompilerServices; | |
public class C { | |
async async await(await async) => await async; | |
} | |
[AsyncMethodBuilder(typeof(builder))] | |
class async { | |
public awaiter GetAwaiter() => throw null; |
A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'
COPY src/*/*.csproj ./ | |
RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done |
+----------------------+--------------------+--------------------+--------------------+
| Operation | F-Sharp | Compability | Haskell |
+======================+====================+====================+====================+
| List.append | @ | | ++ |
+----------------------+--------------------+--------------------+--------------------+
| Function composition | f << g | f . (g) | f . g |
+----------------------+--------------------+--------------------+--------------------+
| | = | == | == |
+----------------------+--------------------+--------------------+--------------------+
+--------------------+--------------------+-------------------------+--------------------+
|Operation | F#+ / F# |F#+ Haskell Compatibility|Haskell |
+====================+====================+=========================+====================+
|List.append | @ | | ++ |
+--------------------+--------------------+-------------------------+--------------------+
|Function composition| f << g | f . (g) | f . g |
+--------------------+--------------------+-------------------------+--------------------+
| | <| | $ | $ |
+--------------------+--------------------+-------------------------+--------------------+
XML processing modules may be not secure against maliciously constructed data. An attacker could abuse XML features to carry out denial of service attacks, access logical files, generate network connections to other machines, or circumvent firewalls.
The penetration tester running XML tests against application will have to determine which XML parser is in use, and then to what kinds of below listed attacks that parser will be vulnerable.
{-# LANGUAGE ApplicativeDo #-} | |
{-# LANGUAGE ConstrainedClassMethods #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE IncoherentInstances #-} | |
{-# LANGUAGE InstanceSigs #-} |