Skip to content

Instantly share code, notes, and snippets.

View Janiczek's full-sized avatar

Martin Janiczek Janiczek

View GitHub Profile
x =
identity <|
case
identity
(identity
(((99.99999999999997 /= -79.88238649066948) && (identity 'a' /= '2'))
&& ((False || (() == ()))
|| (('z' == (identity 'b' |> identity))
|| ((((False || (((99.99999999999997 |> identity) == 100.0) && (-96 == 26)))
|| (False
https://excalidraw.com/#json=PbsiCKzFMapMI32wtyuTM,S81tElByemIdDA9NiNPvtw
@Janiczek
Janiczek / elm-format-monad
Created September 9, 2025 19:11
elm-format-monad
#!/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) {
@Janiczek
Janiczek / SList.elm
Created February 11, 2025 23:10
For some reason ltail is O(n) while rtail is O(1)
module SList exposing
( SList, empty, fromList, toList
, lcons, rcons
, lhead, rhead
, ltail, rtail
, reverse
)
type SList a
@Janiczek
Janiczek / adventofcode.com.css
Last active December 4, 2024 09:26
Advent of Code - Gruvbox user CSS
* {
font-family: "JetBrains Mono" !important;
font-size: 14px;
font-weight: 500;
}
code::before {
top: -1px;
bottom: -1px;
left: -4px;
@Janiczek
Janiczek / 00_README.md
Last active January 1, 2026 12:51
Arturia Minilab 3 Sysex codes

Arturia Minilab 3 SysEx messages

I was mainly interested in finding out how to change pad colours.

There was this Github repo detailing some SysEx messages for Minilab 2, but that didn't work for Minilab 3.

In the end I downloaded the DAW integration scripts from the Resources page and decompiled the Bitwig Java classes (you need to unzip the .bwextension file). That gave me the coveted secret SysEx commands :)

Initialization

@Janiczek
Janiczek / RAList.elm
Created February 28, 2024 22:33
Random access lists in Elm (WIP)
module RAList exposing (RAList, cons, empty, fromList, head, isEmpty, lookup, tail, update)
{-| Okasaki, Random Access Lists
<https://dl.acm.org/doi/pdf/10.1145/224164.224187>
O(1) list operations (cons, head, tail)
O(log\_2 n) array operations (lookup, update)
-}
@Janiczek
Janiczek / crc32.hvm
Created February 28, 2024 18:27
CRC32 in HVM
/*
CRC32 in HVM
A port of https://github.com/openbsd/src/blob/d4c9bc7e07bcf455e26a4d261eb43cf80a9b7fe1/bin/md5/crc.c
*/
testString = "foo bar baz" // --> CRC: 2461288740
main = (CRC.run testString)
# Fast macOS key repeat
https://apple.stackexchange.com/questions/10467/how-to-increase-keyboard-key-repeat-rate-on-os-x
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
@Janiczek
Janiczek / .vimrc
Created January 20, 2024 17:53
Elm errors in the editor
" ALE
let g:ale_linters = {
\ 'elm': ['make'],
\ }
Plug 'dense-analysis/ale'
Plug 'blueyed/vim-qf_resize'
let g:ale_linters_explicit = 1
let g:ale_open_list = 1