Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

superherointj superherointj

🏠
Working from home
View GitHub Profile
View gist:2d707b00b2c375a51324490b781dd52c
# 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
@superherointj
superherointj / configuration.nix
Created Sep 9, 2020
Libvirtd in NixOS @ RockPro64 triggers kernel panic
View configuration.nix
{ 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;
@superherointj
superherointj / 10-monitor.conf
Created Aug 23, 2020
X11 - xorg.conf.d - 10-monitor.conf
View 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 / demo1.ml
Created Jun 18, 2020
OCaml Functor Demo1
View demo1.ml
(* 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 / dune
Created Jun 4, 2020
OCaml, LWT, Rresult - Catching exception before reaching Lwt_main.run
View dune
(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 / Dockerfile-error.log
Created Jun 2, 2020
Ocaml-Esy Project w/ Inconsistent build behaviour
View Dockerfile-error.log
# 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)
View demo.log
info esy 0.6.4 (using package.json)
info building ocaml@4.9.0@d41d8cd9
error: build failed with exit code: 1
build log:
# esy-build-package: building: ocaml@4.9.0
# 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 / .bashrc
Created May 10, 2020
.bashrc customized
View .bashrc
# ~/.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)\]"
View .Xdefaults
! 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
View Dockerfile
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
You can’t perform that action at this time.