Skip to content

Instantly share code, notes, and snippets.

@jzebedee
jzebedee / gist:d5e6c726692b83baf68fb5fc241c2929
Created September 20, 2023 01:27
Why don't we test .NET Framework targets that involve compiled assemblies?
Q: Why don't we test .NET Framework (`netXXX`, e.g., `net472`) targets that involve compiled assemblies?
A: Because it doesn't work.
The longer answer is that the `runtimes/` assembly resolution logic doesn't seem to work correctly on .NET Framework when a RID isn't specified. Native assets will be correctly copied into the appropriate `runtimes/` folder but the DllImport probing won't select for them if a RID is missing.
@jzebedee
jzebedee / instructions.md
Last active June 23, 2023 16:58
Time of Use

Import HVAC runtime data

sqlite-utils insert energy.db energy report-310102929379-2023-05-22-to-2023-06-22.csv --csv

Import smart meter usage data

sqlite-utils insert energy.db intervals IntervalData.csv --csv

Query

@jzebedee
jzebedee / summary.md
Created December 17, 2021 18:18
SqrtBenchmarks

// * Summary *

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores .NET SDK=6.0.101 [Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT RyuJitX64 : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

Job=RyuJitX64 Jit=RyuJit Platform=X64

@jzebedee
jzebedee / _spectrum.html
Last active October 3, 2019 19:16
My Spectrum ISP injected this page into a third-party site delivered over HTTP. It displays a warning message customized with my account ID and includes unsecured javascript loaded from a Spectrum-controlled IP.
<!DOCTYPE html>
<html>
<head><noscript>
<meta http-equiv="refresh"
content="0;URL=http://68.184.190.34/cgi-bin/noscript?policy=109&policyname=DMCA-Weekday-Mornings&time=1570107741">
</noscript>
<title></title>
<script type="text/javascript">var version = 2; var webServer = "http://68.184.190.34";</script>
<script type="text/javascript" src="http://68.184.190.34/dyn/bg/DMCA/index.js"></script>
@jzebedee
jzebedee / v1.0.2-beta ironman
Created May 6, 2019 03:35
Imperator: Rome Gamestate Format: Top-level structure
2019-05-05
v1.0.2-beta
SAV010080526c9a000000b9
save_game_version=17959
version="r2431319e43c3e8053940037622cb48acc57f3b14"
date=450.10.1
ironman=yes
meta_player_name="Ulutia"
enabled_dlcs={...}
@jzebedee
jzebedee / wasteoftime.cs
Created March 13, 2019 23:41
try.dot.net - strings
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
public class Program
{
public static void Main()
{
char empty_char = '\0';
@jzebedee
jzebedee / letter.md
Last active February 19, 2019 02:46
Abrynos-ironmunge-response

Hello Sebastian. I'm not sure why you directed feedback at /u/finkrer, but since I developed ironmunge I'll be responding to your questions.

I should be upfront about my reasons for responding. I'm not writing this out as any serious attempt to defend the project, but as an open letter to show how not to behave in the FOSS world. Because as open-source contributors, we should know that the currency of technical discussion is in contribution.

Good-faith efforts improve software through focused issues, pull requests, forks, and actual labor. Dissing codebases on Reddit by complaining about var do not. It has about as much impact as a guy on a subway screaming that the CIA has tapped into everyone's brains and that we need to wear tin-foil hats: he's probably wrong, he's definitely acting like a wad, and even if he was right, nothing is getting changed from what he's doing.

Since your top comment is already hidden, I don't think there's much to add on Reddit either. I've ad

@jzebedee
jzebedee / gist:abdb1b530a0c2ff71be3
Created December 1, 2014 08:26
Subnormality issue

This has the issue:

<a href="http://www.viruscomix.com/findingjebus.html"><br>
	<img style="border: 0px solid ; width: 632px; height: 150px; position: absolute; z-index: 1; top: 171px; left: 7px;" alt="" src="jad2.jpg">
</a>

This doesn't have the issue:

@jzebedee
jzebedee / gist:dfc0907fb65c534143f1
Created August 29, 2014 21:05
plagiarized from a great book
a
----
static void Main(string[] args)
{
int a = 13;
int b = 14;
int c = a + b;
Console.WriteLine(c);
Value = field.GetValue(this);
IOType = valueType = field.FieldType;
if (Value is Enum)
IOType = enumType = Enum.GetUnderlyingType(valueType);
else
enumType = null;
if (IOType == typeof(float))
writer.Write((float)(object)Value);