Skip to content

Instantly share code, notes, and snippets.

Flechner Romain rflechner

Block or report user

Report or block rflechner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nugets.cmd
nuget install canopy -Version 2.0.1 -OutputDirectory packages -ExcludeVersion -Prerelease
nuget install Selenium.Chrome.WebDriver -Version 2.38.0 -OutputDirectory packages -ExcludeVersion
@rflechner
rflechner / training1.fsx
Created Mar 22, 2018
training fsharp 1
View training1.fsx
printfn "hello world"
open System.Runtime.InteropServices
let mutable name = "toto"
name <- "tata"
let display text =
printfn "%s" text
@rflechner
rflechner / lucene_dot_net.fsx
Last active Nov 10, 2017
Exploring Lucene in Fsharp
View lucene_dot_net.fsx
#I @"../../packages/Newtonsoft.Json/lib/net45/"
#I @"../../packages/Lucene.Net/lib/NET40/"
#r "Lucene.Net.dll"
open System
open System.IO
open System.Globalization
open Lucene
open Lucene.Net
View kevin_html.fsx
let suffixedBy (suffix : string) baseSt = baseSt + suffix
let sayHello name = "Hello " + name
let toNode = // ?
let toBold = toNode "b"
let toBody= toNode "body"
let toParagraph= toNode "p"
let toHtml = toNode "html"
// Imperative style
@rflechner
rflechner / Script1.fsx
Last active Sep 17, 2017
FSharp TypeProviderKata
View Script1.fsx
#I @"packages/SQLProvider/lib/"
#r "FSharp.Data.SqlProvider.dll"
open FSharp.Data.Sql
let [<Literal>] connectionString = "..."
let [<Literal>] resolutionPath = ""
type sql = SqlDataProvider<Common.DatabaseProviderTypes.MSSQLSERVER,
connectionString,
@rflechner
rflechner / install.bat
Created Aug 31, 2017
install mongod as a windows service
View install.bat
mkdir C:\mongodb
mkdir C:\mongodb\log
mkdir C:\mongodb\db
cd C:\mongodb
mongod.exe --install --config C:\mongodb\mongod.cfg
net start MongoDb
@rflechner
rflechner / fsharp-msbuild.fsproj
Created Jul 25, 2017
Workaround for FSharp build conditions
View fsharp-msbuild.fsproj
<!-- fix some build bugs -->
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') ">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<When Condition="'$(VisualStudioVersion)' == '15.0'">
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildProgramFiles32)\Microsoft SDKs\F#\4.1\Framework\v4.0\Microsoft.FSharp.Targets') ">
@rflechner
rflechner / Result.cs
Last active Jun 23, 2017
C# railway oriented programming
View Result.cs
namespace Finexkap.MicroServices.Salesforce.Models.Railway
{
public abstract class Result<T>
{
}
public class Success<T> : Result<T>
{
public Success(T model)
View BCM2835Interop.fs
module BCM2835Interop
open System.Runtime.InteropServices
type FselMode =
| InputMode = 0us
| OutputMode = 1us
| BCM2835_GPIO_FSEL_ALT0 = 0x04us
| BCM2835_GPIO_FSEL_ALT1 = 0x05us
| BCM2835_GPIO_FSEL_ALT2 = 0x06us
| BCM2835_GPIO_FSEL_ALT3 = 0x07us
@rflechner
rflechner / GetSellers.sql
Last active Apr 14, 2017
How to store SQL files in assembly and execute them in C#
View GetSellers.sql
-- this file Embedded resource
SELECT * FROM "Sellers"
You can’t perform that action at this time.