Skip to content

Instantly share code, notes, and snippets.

View arialdomartini's full-sized avatar

Arialdo Martini arialdomartini

View GitHub Profile

The Straightforward Guide to Gitignore Patterns

Introduction

Git's primary job is to hep us track changes to the files in our repository. Towards that end, Git dutifully and repeatedly informs us about untracked files to help remind us to add them with with a git add command.

But there are many files we don't need or want to track and wish to exclude from our repository. We want Git to ignore these files so Git will stop

@xpmatteo
xpmatteo / TurnstileTest.java
Created November 2, 2023 18:57
Recreating in vanilla Java the State monad example from https://en.wikibooks.org/wiki/Haskell/Understanding_monads/State
package it.xpug.spike.monads.monad;
import org.junit.jupiter.api.Test;
import java.util.List;
import java.util.function.Function;
import static it.xpug.spike.monads.monad.TurnstileTest.TurnstileOutput.*;
import static it.xpug.spike.monads.monad.TurnstileTest.TurnstileState.LOCKED;
import static it.xpug.spike.monads.monad.TurnstileTest.TurnstileState.UNLOCKED;
@hirrolot
hirrolot / CoC.ml
Last active April 17, 2025 05:06
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
@caksoylar
caksoylar / zen-display-improvements.md
Last active December 10, 2024 07:25
Corne-ish Zen display improvements

Display improvements for the Corne-ish Zen keyboard

This note details the changes made to the Zen and ZMK codebase to improve the experience of e-ink displays.

Getting the changes

You can test out below changes using your Zen config repo by modifying your config/west.yml file, following ZMK instructions:

manifest:
  remotes:
 - name: caksoylar
@emadb
emadb / fizz_buzz.exs
Last active August 8, 2019 09:38
FizzBuzz in Elixir using only functions: no numbers, no strings, no loops and no ifs!
defmodule Church do
def fizzbuzz do
(fn k -> fn f -> ((fn f -> (fn x -> f.(fn y -> x.(x).(y) end) end).(fn x -> f.(fn y -> x.(x).(y) end) end) end).(
fn f -> fn l -> fn x -> fn g ->
(fn b -> b end).((fn p -> p.(fn a -> fn b -> a end end) end).(l)).(x).(fn y -> g.(f.((fn l -> (fn p -> p.(fn a -> fn b -> b end end) end)
.((fn p -> p.(fn a -> fn b -> b end end) end).(l)) end).(l)).(x).(g)).((fn l -> (fn p -> p.(fn a -> fn b -> a end end) end)
.((fn p -> p.(fn a -> fn b -> b end end) end).(l)) end).(l)).(y) end)
end end end end
)).(k).((fn x -> fn y -> fn f -> f.(x).(y) end end end).(fn x -> (fn y -> x end) end).(fn x -> (fn y -> y end) end))
@lucax88x
lucax88x / docker-compose.prod.yml
Created October 6, 2017 11:03
docker-compose with proxy -> api / app -> postgres / redis / elasticsearch
version: '3'
services:
proxy:
build:
context: ./src
dockerfile: dockerfile.proxy
links:
- api
- app
ports: