Skip to content

Instantly share code, notes, and snippets.

View Arithmomaniac's full-sized avatar

Avi Levin Arithmomaniac

View GitHub Profile
@Arithmomaniac
Arithmomaniac / Get-GoralHaGra.ps1
Last active February 10, 2026 12:27
Goral HaGra — Claude Code Agent Skill for the Divine Lot of the Vilna Gaon (Sefaria API)
<#
.SYNOPSIS
Interacts with the Sefaria REST API to support the Goral HaGra skill.
.DESCRIPTION
Provides actions for random verse selection, translation lookup, verse data retrieval,
and related text search using the Sefaria API.
#>
param(
[ValidateSet('random-verse', 'get-translations', 'get-verse-data', 'search-related')]
[string]$Action = 'random-verse',
@Arithmomaniac
Arithmomaniac / with_common_parameters.yml
Created September 16, 2024 16:53
tsp-openapi3: common parameters not imported
openapi: 3.0.0
info:
title: (title)
version: 0.0.0
tags: []
paths:
/widgets/{id}:
get:
operationId: Widgets_read
responses:
@Arithmomaniac
Arithmomaniac / AsyncChannelPresentation_Public.dib
Created August 9, 2023 06:57
Presentation - Data Flows with Async Streams and Channels
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"languageName":"csharp","name":"csharp"}]}}
#!markdown
# Data Flows with Async Streams and Channels
Avi Levin (@Arithmomaniac)<br>
2023-07-30
@Arithmomaniac
Arithmomaniac / AsyncEnumeratorStream.linq
Last active October 20, 2022 08:43
Stream from async byte enumerator
<Query Kind="Statements" />
using System;
using System.Buffers;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
// based on https://github.com/dotnet/runtime/blob/main/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReaderStream.cs
@Arithmomaniac
Arithmomaniac / GroupBatch.cs
Created August 8, 2017 21:47
GroupBatch naive implementation
public static class GroupBatchExtension
{
/// <summary>A simple IGrouping implementation used by GroupBatch.</summary>
private class GroupBatchGrouping<TKey, TElement> : List<TElement>, IGrouping<TKey, TElement>
{
public GroupBatchGrouping(int rank, TKey key, IEnumerable<TElement> values):base(values)
{
Key = key;
Rank = rank;
}
# The following is from https://blogs.technet.microsoft.com/pauljones/2014/01/09/backing-up-a-file-system-to-azure-storage-with-powershell-2/
# This script was written by Kevin Saye (ksaye@saye.org)
#
# This is a Powershell backup script that backs up entire directories to Azure Storage
# to get the Azure Powershell modules, you must install the following commandlets:
# http://www.windowsazure.com/en-us/manage/install-and-configure-windows-powershell/
# A special thanks to http://www.nikgupta.net/2013/09/azure-blob-storage-powershell/ for the tips!
#
# I am assuming you have one container for each machine you are backing up.