Skip to content

Instantly share code, notes, and snippets.

Avatar
😉

Jörg Thalheim Mic92

😉
View GitHub Profile
View foo.log
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/wxcmkklql7al9z1ipp62z855i3b0bqhy-search
source root is search
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
View log
[scott@dev01:~/STAG]$ ./dev.sh
🔨 Welcome to devshell
[general commands]
dotnet - .NET SDK 6.0.100
just - A handy way to save and run project-specific commands
menu - prints this menu
niv - Easy dependency management for Nix projects
node - Event-driven I/O framework for the V8 JavaScript engine
View foo.log
╭─[~PRJ_ROOT/stag-api]─[stag-api-nixos*]─⇡
╰─ % DOTNET_ROOT='/nix/store/5kniz6zwqgvq56h6nlqm4yvgidz7xva3-aspnetcore-runtime-5.0.12' dotnet ef database update --assembly /nix/store/zcfx1fx62c52wmyjvmqni294xklxnb9m-stag-api-0/lib/STAGWeb/STAGWeb
System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load file or assembly 'Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies.
Could not load file or assembly 'Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies.
Could not load file or assembly 'Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies.
Could not load file or assembly 'Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its
View gist:891cdff1912670f71f8df7a4e9b811c9
diff --git a/.envrc b/.envrc
index 8aaa78e..1d47631 100644
--- a/.envrc
+++ b/.envrc
@@ -7,6 +7,17 @@ watch_dir nix
watch_file default.nix BUILD.nix
# Build and load the devshell
-out=$(nix-build -A shell --no-out-link)
+layout_dir=$(direnv_layout_dir)
@Mic92
Mic92 / wormhole-client
Last active Feb 13, 2022
Proof of concept for sharing tmux with wormhole port forwarding based on https://github.com/magic-wormhole/magic-wormhole.rs/pull/135/
View wormhole-client
#!/usr/bin/env bash
set -eux -o pipefail
export PATH=$(pwd)/target/debug:$PATH
wormhole forward connect --port=2010 "$1" &
sleep 10
socat file:`tty`,raw,echo=0 tcp-connect:localhost:2010
View ubuntu-sleep.yaml
apiVersion: v1
kind: Pod
metadata:
name: ubuntu
labels:
app: ubuntu
spec:
containers:
- image: ubuntu
command:
@Mic92
Mic92 / default.nix
Last active Dec 20, 2021
package for llvm lnt
View default.nix
{ python3, fetchFromGitHub, lib, lit }:
let
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.2.19";
src = super.fetchPypi {
pname = "SQLAlchemy";
inherit version;
@Mic92
Mic92 / default.nix
Created Aug 6, 2021
unwrapped clang
View default.nix
with import <nixpkgs> {};
let
gccForLibs = stdenv.cc.cc;
in mkShell {
buildInputs = [
llvmPackages_11.clang-unwrapped
];
disableHardening = true;
CFLAGS = ''-target x86_64-unknown-linux-gnu -resource-dir=${llvmPackages_11.clang}/resource-root -B${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version} -B${llvmPackages_11.clang-unwrapped} --gcc-toolchain=${gccForLibs} -B${stdenv.cc.libc}/lib -idirafter ${stdenv.cc.libc.dev}/include'';
View gist:2e7c31fbce1e08bdf5d34b2eec83ae3f
#!/usr/bin/env python3
import pdb
import os
from tempfile import TemporaryDirectory
def format_bytes(size):
# 2**10 = 1024
power = 2 ** 10
View gist:7ae91f5f0239acb56c67535c683f1bc1
FROM summerwind/actions-runner:latest
ARG GCC_VERSION=10
ARG RUST_VERSION=1.51.0
RUN sudo apt update -y \
&& sudo apt install -y pkg-config libfuse-dev fuse bison flex cmake automake meson libprotobuf-dev protobuf-compiler libgflags-dev gcc-${GCC_VERSION} g++-${GCC_VERSION} \
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} \
15 \
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} \