Skip to content

Instantly share code, notes, and snippets.

View freemo's full-sized avatar

Jeffrey Phillips Freeman freemo

View GitHub Profile
"The Craft endures not in shadow, but in the gleam of righteous labor. Let us stand revealed—not for vanity, but for virtue. For only the visible flame warms the world." — Ron C Nischwitz Sr. (Masonic Enlightenment)
Things never to confuse:
* kindness - weakness
* stupidity - mallice
* lust - love
* learning oppertunity - failure
Everything is so inseparably united. As soon as one begins to describe a flower or a tree or a storm or an Indian, a chipmunk, up jumps the whole heavens and earth and God Himself in one inseparable glory! When we try to pick out anything by itself we find that it is bound fast by a thousand invisible cords that cannot be broken, to everything in the universe. -- John Muir
@freemo
freemo / Explicit
Last active November 11, 2025 20:16
Review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improve coverage on file `$$FILE_PATH$$` by writing tests that will target the uncovered lines in the report.
class ImmutableMeta(ElementMeta):
def __new__(cls, name, bases, namespace, **kwargs):
def my_setattr(self, name, value):
if hasattr(self, "_immutable") and self._immutable and not name.startswith("__"):
raise AttributeError("this class was set immutable can not set %s, %s" % (name, self))
return object.__setattr__(self, name, value)
namespace["__setattr__"] = my_setattr
def my_freeze(self):
self._immutable = True
@freemo
freemo / compile.sh
Last active November 2, 2025 17:00
git clean -xdf && cp -r ../include/ . && mkdir -p m4 && aclocal --force && libtoolize --force --copy && automake --foreign --add-missing --copy --force && autoconf --force && CC=clang ./configure --target=windows-shared-x64 && CC=clang make && ls .libs
git clean -xdf && cp -r ../include/ . && mkdir -p m4 && aclocal --force && libtoolize --force --copy && automake --foreign --add-missing --copy --force && autoconf --force && docker run --rm aparapi/aparapi-toolchain-win64 > dockcross && chmod +x dockcross && ./dockcross ./configure --host=x86_64 --target=windows-shared-x64 && ./dockcross make && ls .libs
@freemo
freemo / script
Last active October 22, 2023 11:58
Backup script usint btrfs
#!/bin/bash
TIMESTAMP=$(date +%F_%R)
OLD_TIMESTAMP="$1"
echo "new timestamp is $TIMESTAMP"
echo "old time is $OLD_TIMESTAMP"
if [ -z "$OLD_TIMESTAMP" ]
then
@freemo
freemo / Script
Last active October 30, 2025 22:25
BTRFS change writability
btrfs property set -ts /path/to/snapshot ro false
btrfs property set -ts /path/to/snapshot ro true
@freemo
freemo / script
Last active October 30, 2025 22:25
Get the boot up dmesg output for a previous boot.
#list all boot-id
journalctl --list-boots
#display dmesg for specific boot-id
journalctl -b <boot-id>