Skip to content

Instantly share code, notes, and snippets.

View jkone27's full-sized avatar
🌴
On vacation

gparmigiani jkone27

🌴
On vacation
View GitHub Profile
@jonas1ara
jonas1ara / Program.fs
Created October 31, 2023 05:00
Sentiment analysis using ML.NET and F#
open Shared
open System
open System.IO
open Microsoft.ML
open Shared.Models.MLModel
// Define variables
let baseDirectory = __SOURCE_DIRECTORY__
let baseDirectory' = Directory.GetParent(baseDirectory)
@FbN
FbN / vite.config.js
Last active May 21, 2024 17:16
vite.config.js node built-in polyfills
// yarn add --dev @esbuild-plugins/node-globals-polyfill
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
// yarn add --dev @esbuild-plugins/node-modules-polyfill
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill'
// You don't need to add this to deps, it's included by @esbuild-plugins/node-modules-polyfill
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
export default {
resolve: {
alias: {
//open System.IO
//Directory.GetFiles(@"C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\5.0.11", "*.dll")
//|> Array.map (fun f -> $"""#r "{Path.GetFileName(f)}" """)
//|> Array.iter (printfn "%s")
#I @"C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\5.0.11"
#r "Microsoft.AspNetCore.Antiforgery.dll"
#r "Microsoft.AspNetCore.Authentication.Abstractions.dll"
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 23, 2024 23:37
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@stevetalkscode
stevetalkscode / NSwagCommands.md
Last active July 24, 2023 13:54
NSwag Commands for use with OpenApiReference Options element
Command Value Type Default Value Description
Namespace string "MyNamespace" The namespace to use on the generated classes for the generated client class
AdditionalNamespaceUsages string[] Empty Array Additional namespaces to include in using directives for the client
@danielcrenna
danielcrenna / EndpointTests.cs
Created March 5, 2021 18:18
ASP.NET Core: Show web application logs in in-memory integration tests
// Copyright (c) Daniel Crenna. All rights reserved.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at http://mozilla.org/MPL/2.0/.
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Testing;
using Xunit;
@smola
smola / sdkman_oracle_jdk.sh
Last active March 14, 2024 12:07
Install Oracle JDK 8 for use with SDKMAN
#!/bin/bash
#
# Install Oracle JDK 8 for use with SDKMAN
#
set -eu
# This URL can be discovered using https://sites.google.com/view/java-se-download-url-converter
DOWNLOAD_URL="https://javadl.oracle.com/webapps/download/GetFile/1.8.0_331-b09/165374ff4ea84ef0bbd821706e29b123/linux-i586/jdk-8u331-linux-x64.tar.gz"
TARBALL="jdk-8u331-linux-x64.tar.gz"
@akhansari
akhansari / onion-1.fs
Last active February 22, 2023 16:51
F# : Onion architecture in a nutshell
// 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
@noinarisak
noinarisak / Dockerfile
Last active March 1, 2024 10:20
VsCode devcontainer development setup for Java 8
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM openjdk:8-jdk
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).