Skip to content

Instantly share code, notes, and snippets.

View Janiczek's full-sized avatar

Martin Janiczek Janiczek

View GitHub Profile
Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/nvim-lsp-installer'
Plug 'lifepillar/vim-mucomplete'
" LSP Elm+Tailwind tries:
lua << EOF
require("nvim-lsp-installer").setup({
#!/usr/bin/env node
// A work around to https://github.com/avh4/elm-format/issues/352
// * Use it in place of elm-format (only some flags are supported)
// * Run it from a directory containing node_modules/elm-format/bin/elm-format (but you can change it below)
function extractFirstRegexMatch(regex, elmCode) {
package example
object Hello {
def main(args: Array[String]): Unit =
println("Hello")
// 1 implicit conversions
// NEVER USE THIS
{
import scala.language.implicitConversions
@Janiczek
Janiczek / Main.elm
Created January 11, 2023 17:05
Benchmark List.init
module Main exposing (..)
import Benchmark as Bench exposing (Benchmark)
import Benchmark.Runner.Alternative as Runner exposing (Program)
main : Program
main =
Runner.program suite
@Janiczek
Janiczek / Pred.elm
Last active December 4, 2022 21:34
Advent of Code 2022-04 - code synthesis
module Pred exposing (..)
import List.Cartesian
import Transform
type alias Example =
( Range, Range )
@Janiczek
Janiczek / OrderBench.elm
Created November 16, 2022 16:33
basics-extra orderBy benchmark
module OrderBench exposing (main)
{-| To run the benchmarks, first compile them with
elm make OrderBench.elm --optimize
from this folder. Then open the generated index.html file in a browser.
-}
module Helpers exposing (exprFuzzer)
import Fuzz exposing (Fuzzer)
exprFuzzer :
{ baseCases : List (Fuzzer a)
, recursiveCases : Fuzzer a -> List (Fuzzer a)
, maxDepth : Int
}
@Janiczek
Janiczek / Main.elm
Last active August 18, 2025 12:36
Free Monad + Interpreter in Elm
module Main exposing (..)
{-| Free monad + interpreter in Elm
-}
import Dict exposing (Dict)
{-| Dict String Int-like structure
@Janiczek
Janiczek / Main.elm
Created October 4, 2022 18:38
SPA navigation
main : Program Flags Model Msg
main =
Browser.application
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
, onUrlChange = PathChange
, onUrlRequest = LinkClicked
}
@Janiczek
Janiczek / README.md
Created August 19, 2022 23:51
Usage of functions from List.Extra across published packages