Skip to content

Instantly share code, notes, and snippets.

@wyattearp
wyattearp / wifi-serial.ino
Created August 3, 2019 01:30
ESP32 WiFi <-> 3x UART Bridge
/**** This version is ported by Atadiat to work on ESP8266 (tested on NodeMCU 1.0) ****/
/**** Porting was done by Yahya Tawil****/
// ESP32 WiFi <-> 3x UART Bridge
// by AlphaLima
// www.LK8000.com
// Disclaimer: Don't use for life support systems
// or any other situations where system failure may affect
module JsonTransformer =
open System
open System.Globalization
open System.Text
type Json =
| Null
| Bool of bool
| Number of float
| String of string
@mrange
mrange / json_transform.md
Last active January 23, 2017 06:53
Monadic JSON Transformers in F#
open FSharp.Quotations
let rec getMethodInfo = function
| Patterns.Call(_,``method``,_) -> ``method``
| Patterns.Lambda(_,body) -> getMethodInfo body
| _ -> failwith "Unexpected Form"
let getGenericMethodInfo functionExpression =
let methodInfo = getMethodInfo functionExpression
if methodInfo.IsGenericMethod then
@Lanchon
Lanchon / stm32cubemx-linux.md
Last active September 18, 2025 06:42
Installing STM32CubeMX on Linux

Installing STM32CubeMX on Linux

The STM32CubeMX tool is written in portable java, but unfortunately it is distributed as a Windows executable embedded in a Windows installer.

To install it on Linux:

  1. sudo java -jar SetupSTM32CubeMX-4.11.0.exe
  2. install the tool somewhere in your home, eg: /home/you/stm32/cubemx
  3. sudo chown -R you:you /home/you/stm32/cubemx
@swlaschin
swlaschin / ConstrainedTypesExamples.fsx
Last active January 7, 2026 17:22
Examples of creating constrained types in F#
// General hints on defining types with constraints or invariants
//
// Just as in C#, use a private constructor
// and expose "factory" methods that enforce the constraints
//
// In F#, only classes can have private constructors with public members.
//
// If you want to use the record and DU types, the whole type becomes
// private, which means that you also need to provide:
// * a constructor function ("create").

Git Cheat Sheet

Commands

Getting Started

git init

or

@latkin
latkin / README.md
Last active August 29, 2015 14:12
Extended 'for' loops for F#

Backing code and examples for two different mini-frameworks adding extended imperative-style for loops in F#.

Discussed in blog post here.

@Thorium
Thorium / gulpfile.js
Last active August 29, 2015 14:11
JavaScript minifier for FunScript
// Put this file to your FunScript output folder.
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
sourcemaps = require('gulp-sourcemaps');
var jsfile = {
targetPath: '',
//This is your FunScript-generated .js-file:
sources: ['generated.js']