This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<RequireQualifiedAccess>] | |
module SpecwithparametersandrequestbodyAPI | |
open System.ComponentModel.DataAnnotations | |
open FSharp.Control.Tasks.V2.ContextInsensitive | |
open Giraffe | |
open System.Threading.Tasks | |
open Microsoft.AspNetCore.Http | |
open Microsoft.Extensions.DependencyInjection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#inspired by HellBrick | |
#author: https://github.com/bessgeor | |
#license: MIT | |
#Copyright 2021 George Bessonov | |
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Collections.Generic | |
open System.Linq | |
open System.Linq.Expressions | |
open System.Reflection | |
open LinqToDB | |
module AST_Conversion = | |
type private StubContext() = | |
interface IDataContext with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(checkForUnexpectedNulls (fun (x: dataSetListInput) -> | |
(seq { | |
if isNullReference x then | |
"body" | |
else if isNullReference x.nullCheckingTest then | |
"body.nullCheckingTest" | |
else | |
yield! | |
x.nullCheckingTest | |
|> Seq.mapi (fun i1 -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using ZeroORM.SqlBuilder.Vendor; | |
namespace ZeroORM.SqlBuilder | |
{ | |
public static class NpgsqlExtension | |
{ | |
/// <summary> | |
/// Single vendor in list overload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PoorMansOption | |
{ | |
public static class OptionExtensions | |
{ | |
public static Option<T, T> Some<T>(T value) | |
where T : class | |
=> new Option<T, T>(value, true, _ => _); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as moment from 'moment'; | |
type ArrayLike = any[] & { length: number }; // { length?: number } extends any[] == true | |
type IsNullable<T> = null extends T ? true : false; | |
type IsUndefinable<T> = undefined extends T ? true : false; | |
type Unwrap<T> = T extends (infer U)[] ? U : never; | |
type IsArray<T> = T extends ArrayLike ? true : false; | |
type EnumLike<T> = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#inspired by HellBrick | |
function replace_commit_message { | |
commit_msg=$1 | |
ticket=$2 | |
to_insert=" ( ticket #$ticket )" | |
# hook should not insert ticket id if it is already inserted | |
already_ticketed=`grep -c "$to_insert" $commit_msg_file` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#inspired by HellBrick | |
commit_msg_file=$1 | |
detached_head='unnamed branch' | |
current_branch="$(git symbolic-ref HEAD 2>/dev/null)" || | |
current_branch="$detached_head" | |
pipe_separated_system_branches="smartgit-temp|bitbucket-temp" |