Skip to content

Instantly share code, notes, and snippets.

View rido-min's full-sized avatar
💭
coding

Rido rido-min

💭
coding
View GitHub Profile
@rido-min
rido-min / clean.proj.xml
Created April 30, 2025 16:33
clean.proj
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="CleanAll">
<Target Name="CleanAll">
<CreateItem Include=".\**\debug\**\*;.\**\release\**\*;.\**\obj\**\*;.\TestResults\**\*;.\**\*.*scc;.\**\*.user">
<Output ItemName="DbgFiles" TaskParameter="Include"/>
</CreateItem>
<Message Text="Deleting Debug Files" Importance="high" />
<Delete Files="%(DbgFiles.Identity)" ContinueOnError="true" TreatErrorsAsWarnings="true">
<Output ItemName="DeletedFiles1" TaskParameter="DeletedFiles"/>
@rido-min
rido-min / miniagent.js
Last active April 15, 2025 16:56
miniagent.js
import express from 'express'
import {
ActivityTypes,
AgentApplication,
MemoryStorage,
CloudAdapter,
authorizeJWT,
loadAuthConfigFromEnv } from '@microsoft/agents-hosting'
#!/bin/bash
resource_group="ridomin-dev"
tunnel_id="ridomin-dev"
if ! devtunnel show $tunnel_id &> /dev/null; then
devtunnel create $tunnel_id -a
devtunnel port create $tunnel_id -p 3978
fi
@rido-min
rido-min / test-bot.js
Created February 11, 2025 05:00
test-with-expect-replies
const { Activity, ActivityTypes, DeliveryModes } = require('@microsoft/agents-activity-schema')
const activity = new Activity(ActivityTypes.Message)
activity.deliveryMode = DeliveryModes.ExpectReplies
activity.text = 'Hello, World!'
activity.recipient = { id: 'bot' }
activity.conversation = { id: 'user' }
activity.channelId = 'test'
activity.serviceUrl = 'bot://bot'
@rido-min
rido-min / uuid.js
Created January 16, 2025 02:48
uuid.js
function uuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
const r = (Math.random() * 16) | 0,
v = c == 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
}

JSON-CS (Compact Schema)

C. Vasters (Microsoft) November 2024

Abstract

This document specifies JSON-CS (Compact Schema), a schema language for JSON data that enforces strict typing, modularity, and determinism. JSON-CS provides a clear and self-contained approach to defining JSON data structures, requiring explicit type declarations and reusable, hierarchical type definitions. It

@rido-min
rido-min / clean-lockfile.sh
Created November 28, 2024 00:21
clean-lock-file.sh
cp package-lock.json package-lock.json.bak
jq 'walk(if type == "object" and .link != true then del(.resolved, .integrity) else . end)' package-lock.json.bak > package-lock.json
rm package-lock.json.bak
@rido-min
rido-min / .gitignore
Last active February 4, 2025 05:21
minimal-bot
node_modules/
dist/
.env
.npmrc
package-lock.json
*.log
@rido-min
rido-min / dotnetlayout.md
Created November 4, 2024 15:12 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@rido-min
rido-min / SchemaRegistryFlows.md
Last active May 16, 2024 00:06
SchemaRegistryFlows

Schema Registration Diagrams

No versioning

sequenceDiagram;
    participant Connector
    participant SREdge
    participant SRCloud