Skip to content

Instantly share code, notes, and snippets.

@mrange
mrange / formlet2.fs
Last active May 22, 2016 11:33
Demonstrating monadic forms in F# and WPF
// A Formlet library for WPF - Inspired by Formlets in Websharper
// The Formlet concept will work fine for Windows.Forms and Xamarin.Forms as well
// This Formlet library doesn't try to be complete. It's an illustration on how
// a Formlet library can be built
#if INTERACTIVE
#r "PresentationCore.dll"
#r "PresentationFrameWork.dll"
#r "WindowsBase.dll"
@TheAngryByrd
TheAngryByrd / build.fsx
Last active September 18, 2016 01:52
Visual Studio Code mono debugging launch.json
//http://www.navision-blog.de/blog/2015/12/21/adding-background-tasks-to-suave-io-websites/
let startApp path =
let info = ProcessStartInfo(FileName = path)
let proc = new System.Diagnostics.Process(StartInfo = info)
start proc
proc
@Krzysztof-Cieslak
Krzysztof-Cieslak / dsl.fsx
Created November 19, 2019 15:36
Using F# 4.7 implicit yield feature to implement DSL in F#
//Builder represeting only one entity in DSL
type Child1State = {SomeState : string}
type Child1Builder () =
[<CustomOperation("set_state")>]
member __.SetState (st, x) = {st with SomeState = x}
@pathikrit
pathikrit / README.md
Last active April 24, 2021 17:36
My highly opinionated list of things needed to build an app in Scala
@vbfox
vbfox / Dapper.fs
Last active April 21, 2022 02:58
Minimal dapper in F#
module DapperFSharp =
open System.Data.SqlClient
open System.Dynamic
open System.Collections.Generic
open Dapper
let dapperQuery<'Result> (query:string) (connection:SqlConnection) =
connection.Query<'Result>(query)
let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq =
@mbostock
mbostock / .block
Last active May 24, 2023 14:39
Poisson-Disc
license: gpl-3.0

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@gerbsen
gerbsen / ssh_agent_start.fish
Last active January 26, 2024 08:13 — forked from schaary/ssh_agent_start.fish
Auto-launching ssh-agent in fish shell
# content has to be in .config/fish/config.fish
# if it does not exist, create the file
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null
@onlurking
onlurking / programming-as-theory-building.md
Last active April 19, 2024 22:31
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

Git Cheat Sheet

Commands

Getting Started

git init

or