Skip to content

Instantly share code, notes, and snippets.

SIGABRT: abort
PC=0x473521 m=0 sigcode=0
goroutine 0 [idle]:
runtime.futex()
runtime/sys_linux_amd64.s:557 +0x21 fp=0x7ffd10e82d98 sp=0x7ffd10e82d90 pc=0x473521
runtime.futexsleep(0x0?, 0x0?, 0x1fd10e82e40?)
runtime/os_linux.go:69 +0x30 fp=0x7ffd10e82de8 sp=0x7ffd10e82d98 pc=0x4376b0
runtime.notesleep(0x2e45ba8)
runtime/lock_futex.go:160 +0x87 fp=0x7ffd10e82e20 sp=0x7ffd10e82de8 pc=0x40eb87
2024-03-13T20:40:32.389Z [DEBUG] policy_eval.broker: dequeue eval: queue=cluster
2024-03-13T20:40:32.389Z [DEBUG] policy_eval.broker: waiting for eval: queue=cluster
2024-03-13T20:40:32.555Z [DEBUG] policy_eval.broker: enqueue eval: eval_id=5a183123-8682-efb8-212c-3e7dbfe1ca41 policy_id=0c3bb192-6669-19ea-ef5b-36498c73814e queue=horizontal token=""
2024-03-13T20:40:32.555Z [DEBUG] policy_eval.broker: eval enqueued: eval_id=5a183123-8682-efb8-212c-3e7dbfe1ca41 policy_id=0c3bb192-6669-19ea-ef5b-36498c73814e queue=horizontal token=""
2024-03-13T20:40:32.555Z [DEBUG] policy_eval.broker: eval dequeued: queue=horizontal eval_id=5a183123-8682-efb8-212c-3e7dbfe1ca41 policy_id=0c3bb192-6669-19ea-ef5b-36498c73814e token=f46a1bd9-38b5-caeb-4440-465f62f2b1fa
2024-03-13T20:40:32.555Z [DEBUG] policy_eval.worker: received policy for evaluation: id=498f9ae4-2550-3c30-0fa2-cdc42e1b461d policy_id=0c3bb192-6669-19ea-ef5b-36498c73814e queue=horizontal target=nomad-target
2024-03-13T20:40:32.556Z [DEBUG] policy_eval.worker.check_
esphome:
name: smart-speaker
friendly_name: Smart Speaker
name_add_mac_suffix: false
min_version: 2023.4.4
esp32:
board: esp-wrover-kit
framework:
version: 2.0.5
"""iCloud account."""
from __future__ import annotations
from datetime import timedelta
import logging
import operator
from typing import Any
from pyicloud import PyiCloudService
from pyicloud.exceptions import (
@DTTerastar
DTTerastar / FixedInstanceProfileAwsCredentials
Created June 15, 2020 15:07
Fixed implementation of InstanceProfileAwsCredentials
internal class FixedInstanceProfileAwsCredentials : AWSCredentials, IDisposable
{
private static readonly Lazy<FixedInstanceProfileAwsCredentials> InstanceLazy = new Lazy<FixedInstanceProfileAwsCredentials>(() => new FixedInstanceProfileAwsCredentials());
private readonly Task _credentialsRetrieverTimer;
private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1);
private bool _disposed;
private ImmutableCredentials _lastRetrievedCredentials;
private FixedInstanceProfileAwsCredentials()
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE log4j:configuration SYSTEM "./log4j.dtd">
<!--
To enable debug logging remove XML comments in the lines below that are marked with "DELETE THIS LINE FOR ENABLING DEBUG LOGGING" text.
The file can be modified without application restart, but some changes can still require restart to take effect.
You might also need to increase the number of files to store to prevent logs from quick rotation
<param name="maxBackupIndex" value="20"/>
-->
@DTTerastar
DTTerastar / BetterRandom
Created January 23, 2014 18:33
This implements Mersenne Twister PseudoRandom number generator
/// <summary>
/// This implements Mersenne Twister PseudoRandom number generator
/// </summary>
public class BetterRandom : Random
{
/* Period parameters */
private const int N = 624;
private const int M = 397;
private const uint UpperMask = 0x80000000; /* most significant w-r bits */
@DTTerastar
DTTerastar / EnsureUniqueFilename
Last active January 4, 2016 06:49
EnsureUniqueFilename helps to generate a unique filename
public class EnsureUniqueFilename
{
private readonly string _path;
private readonly Dictionary<string, bool> _used = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
private string _format = "{0}_{1}{2}";
private int _startingSeq = 2;
public EnsureUniqueFilename(string path)
{
_path = path;
@DTTerastar
DTTerastar / gist:7917094
Last active December 31, 2015 01:49
Log a function call easily w/ log4net. Shouldn't have performance impact if not set to log. Uses [CallerMemberName] so you don't have to supply it. Usage: logger.InfoCall(()=>new { param1, param2, param3})
public static class LogExtensions
{
public static void InfoCall(this ILog log, Func<object> args = null, [CallerMemberName] string name = "")
{
if (log.IsInfoEnabled)
log.Info(new Message(name, (args != null) ? args() : null));
}
public static void DebugCall(this ILog log, Func<object> args = null, [CallerMemberName] string name = "")
{
@DTTerastar
DTTerastar / gist:7327308
Created November 5, 2013 22:16
ResolveUrls without page reference. Makes rooted relative urls. Has very simple syntax with anonymous objects for query string params.
public static string GlobalResolveUrl(string url)
{
return (new Uri(HttpContext.Current.Request.Url, ResolveUrl(url))).GetLeftPart(UriPartial.Query);
}
public static string GlobalResolveUrl(string url, object queryStringParams)
{
return (new Uri(HttpContext.Current.Request.Url, ResolveUrl(url, queryStringParams))).GetLeftPart(UriPartial.Query);
}