Skip to content

Instantly share code, notes, and snippets.

View jeovazero's full-sized avatar
:octocat:
lamentavel

jeovazero

:octocat:
lamentavel
  • JOI/SC
View GitHub Profile
import FindByAgeCmd.*
type Age = Int
case class Person(name: String, age: Age)
val people = List(
Person("alice", 65),
Person("bob", 25),
Person("chien", 15),
@jeovazero
jeovazero / fac
Last active August 6, 2023 02:03
fac n = fac' n 1
fac' n acc =
guard
| n == 0 -> acc
| n < 3 -> n * acc
| else -> fac' (n - 1) (acc * n)
https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1863080
https://youtrack.jetbrains.com/issue/IDEA-59679/Cannot-type-dead-keys-in-Linux
worked:
XMODIFIERS='' idea.sh
on
OS: Debian 11 bullseye
@jeovazero
jeovazero / binary.hs
Last active September 28, 2022 05:41
import Data.Bits
import Data.Char
bin 0 n acc = (Prelude.take n (repeat 0)) ++ acc
bin x n acc = bin (div x 2) (n-1) $ (mod x 2):acc
bs n = Prelude.concat $ fmap show $ bin n 8 []
ibs ls = ibs' ls 0
where
"" Source your .vimrc
"source ~/.vimrc
let mapleader=" "
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching.
set incsearch
@jeovazero
jeovazero / reflect-config.json
Created April 10, 2022 09:13
kotlin-config-graal
[{
"name": "kotlin.reflect.jvm.internal.ReflectionFactoryImpl",
"allDeclaredConstructors": true
},
{
"name": "kotlin.KotlinVersion",
"allPublicMethods": true,
"allDeclaredFields": true,
"allDeclaredMethods": true,
"allDeclaredConstructors": true
# .local/share/applications/idea.desktop
[Desktop Entry]
Name=Intellij IDEA
Comment=Intellij IDEA Community
Exec=/opt/idea/bin/idea.sh
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:2.13-2.8.1
{-# LANGUAGE Rank2Types #-}
mapPair :: (forall x. x -> x) -> (a,b) -> (a,b)
mapPair f (a, b) = (f a, f b)
id' :: forall x. x -> x
id' x = x
main = print $ mapPair id' (1, 'a')
let
config = {
packageOverrides = p: {
sbt = p.sbt.override {
jre = p.jdk11;
};
scala = p.scala.override {
jre = p.jdk11;
};
};