Skip to content

Instantly share code, notes, and snippets.

@ryanorendorff
ryanorendorff / shell.nix
Created December 31, 2019 03:57
Nix shell for Agda development with the Agda standard library
let
pkgs = import (builtins.fetchTarball {
url =
"https://github.com/NixOS/nixpkgs-channels/archive/b0bbacb52134a7e731e549f4c0a7a2a39ca6b481.tar.gz";
sha256 = "15ix4spjpdm6wni28camzjsmhz0gzk3cxhpsk035952plwdxhb67";
}) { };
# The standard library in nixpkgs does not come with a *.agda-lib file, so we
# generate it here.
@ryanorendorff
ryanorendorff / README.md
Last active March 24, 2023 23:23
reth and lighthouse devnet attempted setup

In this procedure, we are attempting to set up a devnet, which is a blockchain completely local to your machine. Below is the attempted procedure to get it up and running.

In general, believe this is the structure we want:

graph TB;
    reth1[reth execution client]
 lighthouse1[Lighthouse consensus client]
@ryanorendorff
ryanorendorff / python-env-mac-with-pyopencl.nix
Last active October 6, 2020 04:34
Installing PyOpenCL on Mac OS Catalina
let
pkgs = import (builtins.fetchTarball {
url =
"https://github.com/NixOS/nixpkgs-channels/archive/nixpkgs-20.03-darwin.tar.gz";
sha256 = "0wci9vylb31wvl3zslw38537dgdvd89w58fvj9acnbv9l378x3hh";
}) { };
packageOverrides = self: super: {
pyopencl = super.pyopencl.overridePythonAttrs (old: rec {
module VectorList where
open import Data.List using (List; sum) renaming ([] to []ᴸ; _∷_ to _∷ᴸ_)
open import Data.Nat using (ℕ)
open import Data.Vec using (Vec; _++_) renaming ([] to []ⱽ; _∷_ to _∷ⱽ_)
infixr 5 _∷ⱽ_
data VectorList (A : Set) : List ℕ → Set where
[]ⱽ : VectorList A []ᴸ
_∷ⱽ_ : {n : ℕ} {ns : List ℕ} → Vec A n → VectorList A ns → VectorList A (n ∷ᴸ ns)
xpra start :10 --xvfb="/nix/store/xal8zwgmbmnwcryynq1ac1l18y61364r-xpra-2.3.3/bin/xpra_Xdummy -noreset -novtswitch -nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth $XAUTHORITY -logfile ${XPRA_LOG_DIR}/Xorg.${DISPLAY}.log -configdir ${HOME}/.xpra/xorg.conf.d/$PID -config {xpra-2.3.3.data/data/etc/xpra/xorg.conf}"
# --xvfb=CMD How to run the headless X server. Default:
# 'xpra_Xdummy -noreset -novtswitch -nolisten tcp
# +extension GLX +extension RANDR +extension RENDER
# -auth $XAUTHORITY -logfile
# ${XPRA_LOG_DIR}/Xorg.${DISPLAY}.log -configdir
# ${HOME}/.xpra/xorg.conf.d/$PID -config build/bdist
# .linux-
# x86_64/wheel/xpra-2.3.3.data/data/etc/xpra/xorg.conf'.