Skip to content

Instantly share code, notes, and snippets.

View DejanMilicic's full-sized avatar
🎯
Focusing

Dejan Milicic DejanMilicic

🎯
Focusing
View GitHub Profile
@DejanMilicic
DejanMilicic / Model.cs
Created February 2, 2020 13:46 — forked from ayende/Model.cs
Code for lesser known ravendb
using System;
using System.Collections.Generic;
using Raven.Client.Documents.Session.Loaders;
namespace LesserKnownFeatures
{
public class Company
{
public string Id { get; set; }
public string ExternalId { get; set; }
:: Install choco .exe and add choco to PATH
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
:: Install all the packages
:: choose: visual studio, office, .net core, .net, rider tools
:::: Dev tools
choco install git.install -y
choco install gitkraken
choco install vscode -y
@DejanMilicic
DejanMilicic / program.cs
Created November 16, 2021 09:40 — forked from phillip-haydon/program.cs
RavenDB Projection Sample
using System;
using System.Collections.Generic;
using System.Linq;
using Raven.Abstractions.Indexing;
using Raven.Client;
using Raven.Client.Document;
using Raven.Client.Indexes;
using Raven.Client.Linq;
namespace RavenDBProjectionTest
public BusinessQuery()
{
Map = prods => from prod in prods
select new
{
Language = prod.Language,
Categories = prod.Categories,
Areas = prod.Areas,
Date = prod.Dates != null ? prod.Dates.Select(x => x.Date).DefaultIfEmpty() : null,
Subjects = prod.Subjects,
@DejanMilicic
DejanMilicic / App.fs
Created February 13, 2022 21:33 — forked from aspnetde/App.fs
Feliz – MVU with React Function Components
module App
open Elmish
type State =
{ CurrentUser: string option }
type Msg =
| SignIn of string
| SignOut
@DejanMilicic
DejanMilicic / fsharp-fable-tips.md
Created February 27, 2022 12:22 — forked from enerqi/fsharp-fable-tips.md
Fable F# Notes

Basic Tooling Setup

Fable is an F# language to javascript compiler powered by Babel.

F# is a language that runs on a Microsoft CLR. Using the .NET Core CLR implementation it works on Windows, Mac or Linux.

F# Linux

  • .NET Core SDK - download the latest 2.1 SDK
  • Mono - mono-complete package
  • F# compiler - fsharp package from the mono repository
@DejanMilicic
DejanMilicic / 0_README.md
Created March 25, 2022 14:50 — forked from YBogomolov/0_README.md
Idris 2 DevContainer

How to use Idris 2 in devcontainer

Step 1: build executable and libraries

Use the Dockerfile below to build the Idris 2 executable and standard library:

docker build --tag=idris2 .
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
[*.fs]
@DejanMilicic
DejanMilicic / ExpressionHelper.fs
Created August 5, 2022 09:25 — forked from MichaelGG/ExpressionHelper.fs
Example module that modifies F# expressions to be more C#-ish Expression<T>s
#if INTERACTIVE
#r "FSharp.PowerPack"
#r "FSharp.PowerPack.Linq"
#endif
open System
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Linq.QuotationEvaluation
open System.Linq.Expressions