Skip to content

Instantly share code, notes, and snippets.

Tobias Burger toburger

Block or report user

Report or block toburger

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
@toburger
toburger / fable-repl.fs
Created Feb 14, 2020
Created with Fable REPL
View fable-repl.fs
module Recharts
open Fable.Core.JsInterop
open Fable.Recharts
open Fable.Recharts.Props
open Fable.React
open Elmish
open Elmish.React
module R = Fable.React.Standard
module P = Fable.React.Props
@toburger
toburger / fable-repl.fs
Created Feb 14, 2020
Created with Fable REPL
View fable-repl.fs
module Recharts
open Fable.Core.JsInterop
open Fable.Recharts
open Fable.Recharts.Props
open Fable.React
open Elmish
open Elmish.React
module R = Fable.React.Standard
module P = Fable.React.Props
@toburger
toburger / fable-repl.fs
Created Dec 2, 2019
Created with Fable REPL
View fable-repl.fs
module private BusinessLogic =
let switchAt pos (str: string) =
let str = Seq.toArray str
let oldpos = (pos + str.Length - 1) % str.Length
let newpos = pos % str.Length
let tmp = str.[newpos]
str.[newpos] <- str.[oldpos]
str.[oldpos] <- tmp
@toburger
toburger / C++ and Qt.md
Last active May 5, 2019
information and ideas...
View C++ and Qt.md

C++ and Qt

General advice

  • [C++] prefer expressions over statements
  • [C++] prefer immutability over mutability
  • [C++] prefer composition over inheritance
  • [Qt] prefer STL over QTL containers

Libraries

@toburger
toburger / prompt.ps1
Last active Mar 16, 2019 — forked from kadet1090/prompt.ps1
PowerLine like prompt for PowerShell
View prompt.ps1
$script:bg = [Console]::BackgroundColor;
$script:first = $true;
$script:last = 0;
function Write-PromptFancyEnd {
Write-Host-NoNewline -ForegroundColor $script:bg
$script:bg = [System.ConsoleColor]::Black
}
@toburger
toburger / idiomaticjsonserialiser.fs
Last active Sep 28, 2017 — forked from isaacabraham/idiomaticjsonserialiser.fs
This JSON.Net converter handles F# discriminated unions with more "idiomatic" JSON than what is generated by the current version of JSON .NET. Option types and single case DUs are transparently handled, and tuple-style properties are used rather than array notation.
View idiomaticjsonserialiser.fs
namespace Newtonsoft.Json.Converters
open Microsoft.FSharp.Reflection
open Newtonsoft.Json
open System
type IdiomaticDuConverter() =
inherit JsonConverter()
[<Literal>]
@toburger
toburger / build.fsx
Last active May 15, 2017
Use fsc 4.x to compile your code
View build.fsx
//...
let fscToolPath = findToolFolderInSubPath "fsc.exe" "packages"
let msbuildProps = [ "FscToolPath", fscToolPath ]
Target "Build" (fun _ ->
!! projectFile
|> MSBuildReleaseExt releaseDir msbuildProps "Build"
|> Log "AppBuild-Output")
View keyboard_speed_settings.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response]
"AutoRepeatDelay"="250"
"AutoRepeatRate"="13"
"BounceTime"="0"
"DelayBeforeAcceptance"="0"
"Flags"="59"
"Last BounceKey Setting"=dword:00000000
"Last Valid Delay"=dword:00000000
View ParserLibrary.fs
(*
ParserLibrary.fsx
Final version of a parser library.
Related blog post: http://fsharpforfunandprofit.com/posts/understanding-parser-combinators-3/
*)
module ParserLibrary
View JsonParser.fs
(*
JsonParser.fsx
A JSON parser built from scratch using a combinator library.
Related blog post: http://fsharpforfunandprofit.com/posts/understanding-parser-combinators-4/
*)
module JsonParser
You can’t perform that action at this time.