Skip to content

Instantly share code, notes, and snippets.

@baruchadi
baruchadi / dea-touchpoints-mermaid.md
Created April 30, 2026 01:30
DEA-aware Round-Robin: product touchpoints (CloverMeds)

DEA-aware Round-Robin — Product Touchpoints

All entry points that route through getAvailableProvider({ deaPolicy }) plus the detection helpers each one uses.

To render in Excalidraw: open https://excalidraw.comInsertGenerate diagram with AI / Mermaid → paste the block below. (Or render in any Markdown viewer that supports Mermaid: GitHub, Obsidian, VS Code preview, etc.)

flowchart TB
    classDef patient fill:#dbeafe,stroke:#1e40af,color:#000
    classDef system fill:#fef3c7,stroke:#92400e,color:#000
@baruchadi
baruchadi / SoundEffectSO.cs
Created July 31, 2021 17:00
Sound effect scriptable object, allows for multiple sound files, varying pitch & volume configuration, and ability to control pitch by semitones
using Sirenix.OdinInspector;
using UnityEditor;
using UnityEngine;
using Utils;
using Random = UnityEngine.Random;
namespace ScriptableObjects
{
[CreateAssetMenu(fileName = "NewSoundEffect", menuName = "Audio/New Sound Effect")]
public class SoundEffectSO : ScriptableObject
@baruchadi
baruchadi / DrowsyLogger.cs
Last active October 24, 2024 14:04
useful Debug.log extensions
using System;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Utils
{
public static class DrowsyLogger
{
public static string Color(this string myStr, string color)
{
InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JObject to Newtonsoft.Json.Linq.JToken.
Newtonsoft.Json.Linq.Extensions.Convert[T,U] (T token) (at <72bc94bec6c44acf84d97f15326490ac>:0)
Newtonsoft.Json.Linq.Extensions.Value[T,U] (System.Collections.Generic.IEnumerable`1[T] value) (at <72bc94bec6c44acf84d97f15326490ac>:0)
Newtonsoft.Json.Linq.Extensions.Value[U] (System.Collections.Generic.IEnumerable`1[T] value) (at <72bc94bec6c44acf84d97f15326490ac>:0)
Unity.RemoteConfig.Editor.UIComponents.SettingsTreeView.CellGUI (UnityEngine.Rect cellRect, Unity.RemoteConfig.Editor.UIComponents.TreeViewItem`1[T] item, System.Int32 column, UnityEditor.IMGUI.Controls.TreeView+RowGUIArgs& args) (at Library/PackageCache/com.unity.remote-config@1.3.1-preview.1/Editor/UIComponents/SettingsTreeview.cs:414)
Unity.RemoteConfig.Editor.UIComponents.SettingsTreeView.RowGUI (UnityEditor.IMGUI.Controls.TreeView+RowGUIArgs args) (at Library/PackageCache/com.unity.remote-config@1.3.1-preview.1/Editor/UIComponents/SettingsTreeview.c