Skip to content

Instantly share code, notes, and snippets.

View jkone27's full-sized avatar
🌴
On vacation

gparmigiani jkone27

🌴
On vacation
View GitHub Profile
@jkone27
jkone27 / falco_openapi.fsx
Last active October 23, 2024 09:49
Falco openapi swagger fsharp
#nowarn "20"
// invoke this script locally to load aspnet dependencies
// https://github.com/TheAngryByrd/IcedTasks/blob/master/generate-sdk-references.fsx
#load "runtime-scripts/Microsoft.AspNetCore.App-latest-8.fsx"
#r "nuget: Falco, 5.0.0-alpha3"
#r "nuget: Falco.OpenApi, 1.0.0-alpha1"
#r "nuget: Swashbuckle.AspNetCore"
open Falco
open Falco.OpenApi
@jkone27
jkone27 / oxpecker_openapi.fsx
Created October 21, 2024 21:50
oxpecker openapi F# swagger
#nowarn "20" // for OOP/ignore values
// invoke this script locally to load aspnet dependencies
// https://github.com/TheAngryByrd/IcedTasks/blob/master/generate-sdk-references.fsx
#load "runtime-scripts/Microsoft.AspNetCore.App-latest-8.fsx"
#r "nuget: Oxpecker"
#r "nuget: Oxpecker.OpenApi"
#r "nuget: Swashbuckle.AspNetCore "
open Microsoft.AspNetCore.Builder
open Microsoft.Extensions.DependencyInjection
@jkone27
jkone27 / orleans-fsharp-actor-model-test.fsx
Created September 30, 2024 10:19
Orleans F# fsx test (not working atm)
#r "nuget: Microsoft.Orleans.Server"
#r "nuget: Microsoft.Extensions.Logging.Console"
#r "nuget: IcedTasks"
open System
open Orleans.Runtime
open Microsoft.Extensions.Hosting
open Orleans.Hosting
open Microsoft.Extensions.Logging
open Microsoft.Extensions.DependencyInjection
@jkone27
jkone27 / semantic_kernel_hugging_chat.fsx
Last active September 16, 2024 16:52
semantic kernel hugging chat completion engine sample
#r "nuget: Microsoft.Extensions.DependencyInjection"
#r "nuget: Microsoft.Extensions.Http"
#r "nuget: Microsoft.Extensions.Logging.Console"
#r "nuget: Microsoft.Extensions.Logging"
#r "nuget: Microsoft.SemanticKernel.Connectors.HuggingFace, 1.12.0-preview"
open Microsoft.SemanticKernel
open Microsoft.SemanticKernel.ChatCompletion
open Microsoft.Extensions.Logging
@jkone27
jkone27 / sdkman_oracle_jdk_macos.sh
Last active July 29, 2024 00:13 — forked from smola/sdkman_oracle_jdk.sh
Install Oracle JDK 8 for use with SDKMAN (test macos not working)
#!/bin/bash
#
# not working atm, Install Oracle JDK 8 for use with SDKMAN on macOS
# download not working...to fix
#
# https://download.oracle.com/otn/java/jdk/8u401-b10/4d245f941845490c91360409ecffb3b4/jdk-8u401-macosx-x64.dmg
# https://gist.github.com/wavezhang/ba8425f24a968ec9b2a8619d7c2d86a6
set -eu
@jkone27
jkone27 / fsharp-minimal-api.fsx
Last active March 7, 2024 12:26
F# aspnetcore minimal API working with OpenApi specs
#load "runtime-scripts/Microsoft.AspNetCore.App-latest-8.fsx"
// to gen the above run this script in the local folder
// https://raw.githubusercontent.com/TheAngryByrd/IcedTasks/master/generate-sdk-references.fsx
#r "nuget: Feliz.ViewEngine"
#r "nuget: Microsoft.AspNetCore.OpenApi"
#r "nuget: Swashbuckle.AspNetCore"
open Microsoft.AspNetCore
open Microsoft.AspNetCore.Builder
@jkone27
jkone27 / sql_provider_libs_copy.fsx
Created March 2, 2024 22:40
Copy dlls to libraries directory for SQLProvider
#r "nuget: Fli"
open Fli
// change these or pass as arguments (modify script)
[<Literal>]
let packagesFolder = "$HOME/.nuget/packages"
[<Literal>]
@jkone27
jkone27 / FsharpSampleFile.fsx
Created February 25, 2024 12:55
F# code sample comparion to ocaml
open System
module Test =
let hello world =
"hello " + world
let lst =
[
"world"
@jkone27
jkone27 / ocaml_sample_file.ml
Created February 25, 2024 12:54
ocaml sample file for comparison with F#
module Test = struct
let hello world =
"hello " ^ world
end
let lst =
[
"world";
"john";
@jkone27
jkone27 / ocean_heat_2023_2024.fsx
Created February 11, 2024 00:54
Ocean Heating 2023 to 2023
//open FSharp.Data.UnitSystems.SI
[<Measure>]
type g
[<Measure>]
type kg
[<Measure>]
type m