Skip to content

Instantly share code, notes, and snippets.

View jongalloway's full-sized avatar

Jon Galloway jongalloway

View GitHub Profile
@jongalloway
jongalloway / Program.cs
Created October 12, 2023 19:53
Simple AI Chat
using Microsoft.Extensions.Logging;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.AI.ChatCompletion;
using Microsoft.SemanticKernel.Memory;
using System.Text;
string aoaiEndpoint = Environment.GetEnvironmentVariable("AZUREOPENAI_ENDPOINT")!;
string aoaiApiKey = Environment.GetEnvironmentVariable("AZUREOPENAI_API_KEY")!;
string gptModelDeploymentName = Environment.GetEnvironmentVariable("AZUREOPENAI_GPT_NAME")!;
string adaTextDeploymentName = Environment.GetEnvironmentVariable("AZUREOPENAI_TEXT_EMBEDDING_NAME")!;
@jongalloway
jongalloway / starcounter.js
Last active January 11, 2023 20:15 — forked from yyx990803/starcounter.js
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@jongalloway
jongalloway / markdown-image-with-link.md
Last active March 26, 2021 02:55
Markdown image with link sample
@jongalloway
jongalloway / recipe1.txt
Created July 28, 2020 21:16
My Next Cookbook.txt
* hotdogs lol
* string cheese
microwave until al dente or whatever
@jongalloway
jongalloway / streamlabs-chat.css
Created April 24, 2020 05:26
Streamlabs Chat CSS tweak so message goes below name. Good for tall, thin layout.
@import url(https://fonts.googleapis.com/css?family=Roboto:700);
* {
box-sizing: border-box;
}
html, body {
height: 100%;
overflow: hidden;
}
@jongalloway
jongalloway / dotnext-moscow-2019-dotnetcore-3.md
Last active April 15, 2020 08:33
Slides and notes from DotNext Moscow 2019 - What You Need To Know About .NET Core 3 and Beyond
@jongalloway
jongalloway / party.yml
Created October 23, 2019 22:15
ASP.NET Core 3.0 - AzDO example
pool:
name: Hosted Ubuntu 1604
steps:
- task: UseDotNet@2
displayName: 'Use .Net Core sdk 3.0.x'
inputs:
version: 3.0.x
- task: DotNetCoreCLI@2
dir -recurse -directory -force -filter .git | % { write-host $_ -ForegroundColor green; git -C "$($_.FullName)\.." gc }
@jongalloway
jongalloway / techorama-2019-dotnetcore3.md
Last active May 20, 2019 06:57
Techorama 2019 - .NET Core 3 App Workshop