Skip to content

Instantly share code, notes, and snippets.

FROM alpine as alpine-ocaml
RUN apk add --no-cache make gcc musl-dev libstdc++ ocaml opam yarn npm nodejs perl autoconf binutils alpine-sdk m4 build-base libtool automake git openssh
RUN mkdir /workdir
WORKDIR /workdir
# Build
FROM alpine-ocaml as esy-build
RUN git clone https://github.com/superherointj/esy-musl.git ./
#RUN make bootstrap
! urxvt
URxvt.iconFile: /usr/share/icons/terminal.svg
URxvt*geometry: 115x40
!URxvt*font: xft:Liberation Mono:pixelsize=14:antialias=false:hinting=true
!MesloLGL-Bold.ttf
URxvt*font: xft:Monaco:pixelsize=14:antialias=true:hinting=true
URxvt*boldFont: xft:Monaco:bold:pixelsize=14:antialias=true:hinting=true
@superherointj
superherointj / .bashrc
Created May 10, 2020 12:35
.bashrc customized
# ~/.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Git Prompt on Bash
source ~/.scripts/git-prompt.sh
### Terminal UserPrompt Colors ####
RESET="\[$(tput sgr0)\]"
@superherointj
superherointj / demo.log
Created May 29, 2020 23:21
Esy demo log
info esy 0.6.4 (using package.json)
info building [email protected]@d41d8cd9
error: build failed with exit code: 1
build log:
# esy-build-package: building: [email protected]
# esy-build-package: pwd: /home/intj/.esy/3/b/ocaml-4.9.0-031bf83c
# esy-build-package: running: './esy-configure' '--disable-cfi' '--prefix' '/home/intj/.esy/3_____________________________________________________________________/s/ocaml-4.9.0-031bf83c'
[esy-configure] Detected OSX / Linux environment
configure: Configuring OCaml version 4.09.0
checking build system type... x86_64-pc-linux-gnu
@superherointj
superherointj / Dockerfile-error.log
Created June 2, 2020 15:01
Ocaml-Esy Project w/ Inconsistent build behaviour
# Unformatted Error Output:
# File "lib/RunTests.re", line 2, characters 0-27:
# Error: Unbound module BatciTest
# Hint: Did you mean BatciTests?
ERROR lib/RunTests.re:2 0-27
1 ┆ /* RunTests.re */
2 ┆ BatciTest.TestFramework.cli();
Module BatciTest; not found in included libraries.
Hint: did you mean BatciTests?
ocamlc lib/.BatciTestE2E.objs/byte/batciTestE2E__TestUtils.{cmi,cmo,cmt} (exit 2)
@superherointj
superherointj / dune
Created June 4, 2020 11:56
OCaml, LWT, Rresult - Catching exception before reaching Lwt_main.run
(executable
(name lwt_demo1)
(public_name lwt_demo1.exe)
(libraries rresult lwt lwt.unix)
(preprocess (pps lwt_ppx))
(flags (:standard -warn-error -22))
)
@superherointj
superherointj / demo1.ml
Created June 18, 2020 18:15
OCaml Functor Demo1
(* Functor example *)
module type Dog = sig
val barks : bool
end;;
module type Animal = sig (* Shouldn't `Animal` module/functor have some parameter in it's signature??? *)
val approach : unit -> string
end;;
@superherointj
superherointj / 10-monitor.conf
Created August 23, 2020 14:19
X11 - xorg.conf.d - 10-monitor.conf
# File: /etc/X11/xorg.conf.d/10-monitor.conf
# How can I configure this in NixOS?
Section "Monitor"
Identifier "DP3"
Option "Primary" "true"
EndSection
Section "Monitor"
Identifier "LVDS1"
@superherointj
superherointj / configuration.nix
Created September 9, 2020 13:43
Libvirtd in NixOS @ RockPro64 triggers kernel panic
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
# Hello. I've have installed an eMMC (128MB) card to my RockPro64. There is 'mmcblk1' and 'mmcblk1boot0' and 'mmcblk1boot'. I wonder if it is all related. And If I should be afraid of doing something stupid here. If I
[intj@k1:~]$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
mtdblock0
mmcblk0
└─mmcblk0p2 ext4 1.0 NIXOS_SD 44444444-4444-4444-8888-888888888888 14.3G 46% /
mmcblk1 exfat 1.0 B08B-E92A
mmcblk1boot0