Skip to content

Instantly share code, notes, and snippets.

View philipmat's full-sized avatar

Philip Mateescu philipmat

View GitHub Profile
@philipmat
philipmat / page-001.html
Last active September 29, 2026 16:09
Claude Code on Evals
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Claude Code transcript - page 1</title>
<style>
:root { --bg-color: #f5f5f5; --card-bg: #ffffff; --user-bg: #e3f2fd; --user-border: #1976d2; --assistant-bg: #f5f5f5; --assistant-border: #9e9e9e; --thinking-bg: #fff8e1; --thinking-border: #ffc107; --thinking-text: #666; --tool-bg: #f3e5f5; --tool-border: #9c27b0; --tool-result-bg: #e8f5e9; --tool-error-bg: #ffebee; --text-color: #212121; --text-muted: #757575; --code-bg: #263238; --code-text: #aed581; }
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-color); color: var(--text-color); margin: 0; padding: 16px; line-height: 1.6; }
@philipmat
philipmat / DeepSeek V3 0324.json
Last active March 6, 2026 16:01
Experiment with model summaries
/*
deepseek/deepseek-chat-v3-0324
Released Mar 24, 2025
163,840 context
$0.20/M input tokens, $0.77/M output tokens
*/
{
"title": "Automating GitHub Profile READMEs with Actions and GraphQL",
"slug": "automating-github-profile-readmes-with-actions-and-graphql",
"summary": "GitHub introduced profile READMEs that display at the top of user profiles when a repository matching the username contains a README.md. Simon Willison created a self-updating profile by using a GitHub Action that runs a Python script to fetch his latest project releases (via GitHub's GraphQL API), blog posts (via Atom feed), and TIL entries (via Datasette API), then dynamically updates the README.md. The solution demonstrates efficient GraphQL pagination for querying multiple repositories and uses commented markers in the README to identify update sections.",
@philipmat
philipmat / Program.cs
Last active October 10, 2023 18:22
DotNet LongTimePattern
Console.WriteLine($".NET Version={Environment.Version}");
Console.WriteLine($"OS={System.Runtime.InteropServices.RuntimeInformation.OSDescription}");
Console.WriteLine($"Long Time Pattern={new System.Globalization.CultureInfo("en-US").DateTimeFormat.LongTimePattern}");
// This file was initially generated by Windows Terminal 1.1.2233.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@philipmat
philipmat / FindFileLockingProcess.ps1
Created July 2, 2021 13:04
Finds process that locks a given file
[cmdletbinding()]
param(
[Parameter(Position=1, Mandatory = $true)] # Position = 1 allow passing without specifying -FileOrFolderPath
[String] $FileOrFolderPath
)
If((Test-Path -Path $FileOrFolderPath) -eq $false) {
Write-Warning "File or directory does not exist."
}
Else {
@philipmat
philipmat / DetermineNetframeworkVersion.ps1
Created July 2, 2021 13:03
Lists all available .NET Framework versions
<#
The sample scripts are not supported under any Microsoft standard support
program or service. The sample scripts are provided AS IS without warranty
of any kind. Microsoft further disclaims all implied warranties including,
without limitation, any implied warranties of merchantability or of fitness for
a particular purpose. The entire risk arising out of the use or performance of
the sample scripts and documentation remains with you. In no event shall
Microsoft, its authors, or anyone else involved in the creation, production, or
delivery of the scripts be liable for any damages whatsoever (including,
without limitation, damages for loss of business profits, business interruption,
@philipmat
philipmat / IAmUpResponder.cs
Created September 11, 2020 14:43
Socket responder - Listens on a socket for incoming connections and responds with "I Am Up" html.
void Main()
{
IamupResponder.StartListening();
return;
}
/// <summary>
/// Listens on a socket for incoming connections and responds with "I Am Up" html.
/// </summary>
/// <remarks>
/// Inspired by:
@philipmat
philipmat / HttpListener.cs
Created September 11, 2020 14:41
HTTP Listener - creates a netcat-like listener on a local port. Returns 201 to all requests
void Main() {
var cts = new CancellationTokenSource();
var task = StartListener(cts.Token);
do {
Thread.Sleep(1);
} while (true);
cts.Cancel();
@philipmat
philipmat / Create LocalDB Databases.linq
Created September 11, 2020 14:32
Create or Attach SQL Database (for LocalDB) - LINQPad script
<Query Kind="Statements">
<Connection>
<ID>3a5c9133-61a0-4989-b34a-b0b4b3967c7f</ID>
<Persist>true</Persist>
<Server>(localdb)\localdev</Server>
<Database>master</Database>
</Connection>
</Query>
// Example:
@philipmat
philipmat / console.log
Created February 15, 2019 22:41
Visual Studio Code macOS freeze
[main 2019-02-15T22:37:18.094Z] Starting VS Code
[main 2019-02-15T22:37:18.095Z] from: /Users/af59986/Applications/Visual Studio Code.app/Contents/Resources/app
[main 2019-02-15T22:37:18.095Z] args: { _: [],
diff: false,
add: false,
goto: false,
'new-window': false,
'reuse-window': false,
wait: false,
version: false,