Skip to content

Instantly share code, notes, and snippets.

View Hakkadaikon's full-sized avatar
💪
100 times more energetic

Hakkadaikon Hakkadaikon

💪
100 times more energetic
View GitHub Profile
@Hakkadaikon
Hakkadaikon / main.c
Created February 27, 2025 21:04
OpenRouter Example
#include <curl/curl.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
typedef char* PCHAR;
typedef void* PVOID;
typedef CURL* PCURL;
typedef struct curl_slist CurlList;
typedef struct curl_slist* PCurlList;
@Hakkadaikon
Hakkadaikon / deep_research_websocket_and_webtransport.md
Last active February 26, 2025 15:22
Deep Research テスト: WebTransport / WebSocketの速度向上について扱った論文

概要

Deep ResearchでWebTransport / WebSocketの速度向上について扱った論文一覧を取ってきて、箇条書きで纏めたもの
英語の要約は、Deep Researchで出力された英語を機械翻訳したもの

出力

@Hakkadaikon
Hakkadaikon / awesome-mcp-server-link.md
Created January 29, 2025 18:16
MCPサーバーリンク集
@Hakkadaikon
Hakkadaikon / memo.md
Last active January 16, 2025 05:35
つよつよサーバーを使ったWebSocket / Nostrリレーのパフォーマンス評価案

設定チューニング

アプリで使うCPUコアの割り込みを禁止

  sudo update-grub
  sudo shutdown -h now
@Hakkadaikon
Hakkadaikon / websocket_flame_parse.c
Created December 30, 2024 10:07
Websocket frame parse (RFC6455)
/**
* @file websocket_frame_parse.c
*
* @brief Parses each parameter of a websocket frame stored in network byte order.
* @see RFC6455 (https://datatracker.ietf.org/doc/html/rfc6455)
*/
#include <alloca.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@Hakkadaikon
Hakkadaikon / main.c
Created October 14, 2024 16:17
SSTP Sample in C
// Ukagaka SSTP send sample
#define _WIN32_WINNT 0x0601 // Windows 7 later
#include <winsock2.h>
#include <ws2tcpip.h>
#include <wincrypt.h>
#include <stdio.h>
#pragma comment(lib, "ws2_32.lib")
@Hakkadaikon
Hakkadaikon / bsky_client.vim
Created July 27, 2024 06:25
bsky_client.vim
" bsky_client.vim
"
" use ui.vim: https://github.com/skanehira/ui.vim
" use indigo: https://github.com/bluesky-social/indigo
let s:cli_path = "./indigo/gosky"
let s:auth_path = "./auth.json"
let s:pds_host = "https://bsky.social"
function! s:set_env() abort
@Hakkadaikon
Hakkadaikon / main.cpp
Created June 12, 2024 16:33
Nostr websocket client WinRT sample
#include <Windows.h>
#include <iostream>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Web.Http.h>
#include <winrt/Windows.Networking.Sockets.h>
#include <winrt/Windows.Storage.Streams.h>
#include <winrt/Windows.Data.Json.h>
using namespace winrt;
@Hakkadaikon
Hakkadaikon / NostrSubscription.cs
Last active June 15, 2024 12:57
NostrSubscriptionCSharp
// Subscribe
using System.Net.WebSockets;
using System.Text;
Uri uri = new("wss://yabu.me/");
using ClientWebSocket ws = new();
await ws.ConnectAsync(uri, default);