Skip to content

Instantly share code, notes, and snippets.

@JordanMarr
JordanMarr / app.html
Created April 20, 2017 21:31
aurelia navmenu issue
<template>
<require from="shell/navmenu"></require>
<require from="product-tab/product-tab"></require>
<navmenu></navmenu>
<div class="container body-content">
<product-tab></product-tab>
</div>
@JordanMarr
JordanMarr / Extensions.cs
Created November 15, 2018 23:33
Reproducing F# intellisense bug when opening C# namespace with extension methods containing unreferencedtypes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsharpProjWithExt
{
public static class Extensions
{
@JordanMarr
JordanMarr / MainWindow.xaml
Last active January 16, 2022 16:28
Example of Using Elmish.WPF + Rx
<Window x:Class="ConsoleApp.Wpf.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ConsoleApp.Wpf.Views"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid Margin="0,25,0,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
module ConsoleApp.Wpf.Program
open System
open Elmish
open Elmish.WPF
open FSharp.Control.Reactive
type Model =
{ Contacts: Rolodex.Contact seq
ContactsFilter: string
ContactsFilterChanged: System.Reactive.Subjects.Subject<string> }
@JordanMarr
JordanMarr / simple.json
Created May 23, 2019 01:47
Simple Json
[{
"Username": "jdoe", "Amount": "1.50"
},
{
"Username": "jdoe", "Amount": "1.50"
}]
Username Amount
jdoe $1.50
rmarsh $3.75
@JordanMarr
JordanMarr / 01 - Toastify.fs
Last active February 18, 2022 18:59
Fable React Toastify
// npm install react-toastify
module Toastify
open Fable.Core
open Fable.Core.JsInterop
open Fable.React
type ToastContainerProps =
| AutoClose of int
@JordanMarr
JordanMarr / DragDropPage.fs
Last active October 11, 2024 06:00
Fable bindings for "react-dnd" using HTML5 provider
module DragDropPage
open Feliz
open Fable.React
open Fable.React.Props
open ReactDND
type Language = {
Name: string
}
@JordanMarr
JordanMarr / 01 - SqlProvider.fs
Last active May 27, 2020 15:26
SQLProvider - Clearing the schema cache
module MyApp.Database.SqlProvider =
open FSharp.Data.Sql
open System.Data
#if DEBUG
// Print generated SQL to console
FSharp.Data.Sql.Common.QueryEvents.SqlQueryEvent |> Event.add (printfn "Executing SQL: %O")
#endif
[<Literal>]
@JordanMarr
JordanMarr / App.fs
Last active June 18, 2020 07:39
Fable React Context
module App
open Feliz
open Fable.React
open Fable.React.Props
open Fable.UIFabric
open Auth
open HookRouter
open Contexts