Skip to content

Instantly share code, notes, and snippets.

@zaneclaes
zaneclaes / electronize start
Created May 28, 2021 00:24
electronize start logs
Start Electron Desktop Application...
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
/Users/zaneclaes/zdrive/zaneclaes/Programming/OWE/src/OpenWorkShop/OpenWorkShop.csproj : warning NU1701: Package 'ArduinoDriver 2.4.6' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project. [/Users/zaneclaes/zdrive/zaneclaes/Programming/OWE/src/OpenWorkShop/OpenWorkShop.sln]
/Users/zaneclaes/zdrive/zaneclaes/Programming/OWE/MakerHub/MakerHub.csproj : warning NU1701: Package 'ArduinoDriver 2.4.6' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramewor
2021-07-07 10:55:19,847 13700 [INFO ] - Installing visualstudio2019buildtools...
2021-07-07 10:55:19,891 13700 [DEBUG] - Running 'Start-VSServicingOperation' for visualstudio2019buildtools with silentArgs:'--quiet --norestart --wait', file:'C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey\visualstudio2019buildtools\16.10.2.0\vs_BuildTools.exe', logFilePath:', operationTexts:'instal
led installing installation', assumeNewVS2017Installer:'True'
2021-07-07 10:55:19,911 13700 [DEBUG] - [20210707 10:55:19.911] Looking for still running VS installer processes
2021-07-07 10:55:19,931 13700 [DEBUG] - Did not find any running VS installer processes.
2021-07-07 10:55:19,931 13700 [DEBUG] - [20210707 10:55:19.931] Looking for vs_installer.windows.exe processes spawned by the uninstaller
2021-07-07 10:55:19,931 13700 [DEBUG] - Did not find any running vs_installer.windows.exe processes.
2021-07-07 10:55:19,947 13700 [INFO ] -
2021-07-07 10:55:19,992 13700 [DEBUG] - Running 'Start-VSChocolateyProcessAsAdmin'
@zaneclaes
zaneclaes / gist:4b87a74fd47ad0e41f2d91be47eeb934
Created July 7, 2021 19:39
Windows wrapper to exclude errors
@echo off
ECHO "RUN %*"
CALL %*
ECHO "Real error code was %errorlevel%"
SET ERRORLEVEL=0
exit /B 0
async function testDice(func, bytes = 2, runs = 1000) {
let sequence = '';
const vals = [];
let last = 0;
for (let i=0; i<runs; i++) {
last = await func(i, last);
let hex = last.toString(16);
while (hex.length < (bytes * 2)) hex = `0${hex}`;
for (let b=0; b<(bytes*2); b++) {
@zaneclaes
zaneclaes / config.g
Created May 22, 2023 20:12
Modix BIG-60 v4 Corrected Configuration
; Modix Big-60, Generation 4, Single Printhead
; Configuration file for Duet WiFi (firmware version 3.4.5)
; Generated by Modix - Version 3.4.5 Config B
global config_version = "Version 3.4.5 Config B"
global generation = 4 ; Generation 4 printer
global printhead = 1 ; Griffin printhead
global printheads = 1 ; single printhead
global idex = 0 ; no IDEX
global expansion = 1 ; Griffin expansion board is installed
@zaneclaes
zaneclaes / heat_index.js
Created October 2, 2023 18:10
Heat Index Calculator
// Returns a Celcius temperature that transforms the input temperature based on the relative humidity
function calculateHeatIndex(airTempC, relativeHumidity){
relativeHumidity = Math.min(100, Math.max(0, relativeHumidity));
var hitemp = 61.0+((airTempC-68.0)*1.2)+(relativeHumidity*0.094);
var hifinal = 0.5*(airTempC+hitemp);
if(hifinal > 79.0){
var hi = -42.379+2.04901523*airTempC+10.14333127*relativeHumidity-0.22475541*airTempC*relativeHumidity-6.83783*(Math.pow(10, -3))*(Math.pow(airTempC, 2))-5.481717*(Math.pow(10, -2))*(Math.pow(relativeHumidity, 2))+1.22874*(Math.pow(10, -3))*(Math.pow(airTempC, 2))*relativeHumidity+8.5282*(Math.pow(10, -4))*airTempC*(Math.pow(relativeHumidity, 2))-1.99*(Math.pow(10, -6))*(Math.pow(airTempC, 2))*(Math.pow(relativeHumidity,2));
if((relativeHumidity <= 13) && (airTempC >= 80.0) && (airTempC <= 112.0)) {
var adj1 = (13.0-relativeHumidity)/4.0;