Skip to content

Instantly share code, notes, and snippets.

View UncleGrumpy's full-sized avatar

Winford UncleGrumpy

View GitHub Profile
@UncleGrumpy
UncleGrumpy / gist:59821292c31852f81a4db7ed42eea87b
Last active November 2, 2025 15:19
Test section from `test_supervisor.erl` that does not receive the exit message when linked supervisor shutsdown
...
test_crash_limits() ->
%% Trap exits so this test doesn't shutdown with the supervisor
process_flag(trap_exit, true),
Intensity = 2,
Period = 5,
{ok, SupPid} = supervisor:start_link(
{local, test_crash_limits}, ?MODULE, {test_crash_limits, Intensity, Period, self()}
),
@UncleGrumpy
UncleGrumpy / http_client_test.erl
Last active September 24, 2025 01:40
ahttp_client example for esp32 & generic_unix using plain http with pauses to let the network connection dissapear
%
% This file is part of AtomVM.
%
% Copyright 2024 Davide Bettio <davide@uninstall.it>
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
@UncleGrumpy
UncleGrumpy / Attiny85_batteryMonitor.ino
Created November 2, 2020 05:56 — forked from dwhacks/Attiny85_batteryMonitor.ino
Attiny battery monitor with tiny core.
/*
Attiny85_batteryMonitor
Ideas borrowed from: https://github.com/unixbigot/Flat-Mate
modified for arduino tiny core by DWhacks
*@@ Voltage trigger levels.
*