Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Larson kergoth

  • Siemens Digital Industries Software
  • Twitter @kergoth
View GitHub Profile
View functions.sh
#!/usr/bin/env bash
set -euo pipefail
msg() {
fmt="$1"
if [ $# -gt 1 ]; then
shift
fi
# shellcheck disable=SC2059
View memoize.bbclass
def memoize(d, varname, func):
"""Calculate the result of func once, replacing the value in the metadata.
This will run the function once rather than every time it's used, but unlike
immediate expansion, this initial expansion occurs the first time it's used.
Example Usage:
TESTVAR = "${@memoize(d, 'TESTVAR', lambda: myfunction(d) or '')}"
TESTVAR[vardepvalue] = "${TESTVAR}"
View sync.txt
## Projects by Authors ## {{{1
# Freeware Software by Bálint Tóth (ex Bali's Calculator)
./Authors/Bálint Tóth/ wayback http://tothb.ehc.hu/software/ tothb.ehc.hu_IA/
# Dave Dunfield's "widgets" for DOS
./Authors/Dave Dunfield/ wget http://dunfield.classiccmp.org/dos/index.htm
# ecm's projects
./Authors/ecm/ wget https://pushbx.org/ecm/download/
@kergoth
kergoth / .envrc
Last active December 29, 2022 18:49
devbox test
View .envrc
if [ -x ./devbox ]; then
devbox () {
./devbox "$@"
}
fi
use_devbox() {
watch_file devbox.json
eval $(devbox shell --print-env)
}
View gist:d7ad882d07e63811cd5773b4f8d0c4b8
diff --git i/home.nix w/home.nix
index aedec3b..84c5bc4 100644
--- i/home.nix
+++ w/home.nix
@@ -10,6 +10,8 @@
# https://rycee.gitlab.io/home-manager/options.html
home.stateVersion = "22.05";
+ nixpkgs.config.allowUnfree = true;
+
View homedir_install.sh
#!/bin/bash
proot_url=https://proot.gitlab.io/proot/bin/proot
bindir=${XDG_DATA_HOME:-$HOME/.local/share}/../bin
scriptdir="$(cd "$(dirname "$0")" && pwd -P)"
PATH=$bindir:$PATH
set -euo pipefail
mkdir -p "$bindir"
View gist:4120aec0e309e8fa833e30d8f788492c
$ OEQA_REPRODUCIBLE_IMAGES=libgfortran oe-selftest -r cbreproducible.CBReproducibleTests.test_reproducible_builds
2022-08-18 02:20:10,167 - oe-selftest - INFO - Adding layer libraries:
2022-08-18 02:20:10,167 - oe-selftest - INFO - /mel/kergoth/mel/codebench-toolchain/multiconfig/meta-mingw/lib
2022-08-18 02:20:10,167 - oe-selftest - INFO - /mel/kergoth/mel/codebench-toolchain/multiconfig/meta-codebench-toolchain/lib
2022-08-18 02:20:10,167 - oe-selftest - INFO - /mel/kergoth/mel/codebench-toolchain/multiconfig/oe-core/meta/lib
2022-08-18 02:20:10,168 - oe-selftest - INFO - /mel/kergoth/mel/codebench-toolchain/multiconfig/oe-core/meta-selftest/lib
2022-08-18 02:20:10,169 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2022-08-18 02:20:15,130 - oe-selftest - INFO - Adding: "include selftest.inc" in /mel/kergoth/mel/codebench-toolchain/multiconfig/build-st/conf/local.conf
2022-08-18 02:20:15,131 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2022
View gist:49f98320ccd84a7dc22fa8fd85ef9830
From ba7f0374ed98dcfef60fffe52c5845df2abc6ffa Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Fri, 5 Feb 2021 02:43:04 +0500
Subject: [PATCH] copydebugsources_extra: check alternative paths for source
files for debug
This handles paths being pulled from paths that package.bbclass currently
does not handle, such as generated sources written to ${B}, as is the case
for libstdc++, or those from work-shared.
View wrap-event-handler.inc
def my_handler(d, logger):
logger.warning('test_warning')
logger.info('test note')
logger.error('test error')
logger.critical('test critical')
sys.exit(1)
python testhandler() {
_, error, logs = run_config_handler(lambda l: my_handler(d, l))
View exo-macos-commands
#!/bin/bash
# FIXME: Currently missing dosbox variants: ece, svn, stock
# Unhandled:
#CTorOCh "./eXoDOS/CTorOCh/dosbox/dosbox.exe" -conf "eXoDOS/\!dos/CTorOCh/dosbox.conf" -noconsole -exit
#FatmanTh "./eXoDOS/FatmanTh/dosbox.exe" -conf "eXoDOS/\!dos/FatmanTh/dosbox.conf" -noconsole -exit
#ThemPark "./eXoDOS/ThemPark/ece/DOSBox.exe" -conf "eXoDOS/\!dos/ThemPark/dosbox.conf" -noconsole -exit -nomenu
#btroot "./eXoDOS/btroot/dosbox/dosbox.exe" -conf "eXoDOS/\!dos/btroot/dosbox.conf" -noconsole -exit
#MinosAdv "./eXoDOS/MinosAdv/DOSBox-0.73/dosbox.exe" -conf "eXoDOS/\!dos/MinosAdv/dosbox.conf" -noconsole -exit
set -euo pipefail