Skip to content

Instantly share code, notes, and snippets.

View Janiczek's full-sized avatar

Martin Janiczek Janiczek

View GitHub Profile
@Janiczek
Janiczek / 00_README.md
Last active April 3, 2024 15:05
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
@Janiczek
Janiczek / Main.elm
Created December 3, 2023 07:21
Synchronous string normalization in Elm
module Main exposing (main)
import Html exposing (Html)
import Json.Decode
import Json.Encode
main : Html msg
main =
Html.ul []
@Janiczek
Janiczek / Common.elm
Last active September 15, 2023 21:37
Elm implementations of shortest distance between two 3D line segments
module Common exposing
( Point
, Segment
, add
, addK
, distance
, dot
, magnitude
, mid
, scale
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