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 / IkuradonGame.cs
Last active October 11, 2023 18:52
IkuradonGame
using System.Diagnostics;
namespace IkuradonGame
{
public partial class MainForm : Form
{
private const int MAX_BALL = 30;
private Rectangle riceRect = new Rectangle();
private Rectangle[] ballRects = new Rectangle[MAX_BALL];
private Point[] diffs = new Point[MAX_BALL];
@Hakkadaikon
Hakkadaikon / calc_shinjiro_bot_price.md
Last active November 21, 2023 13:31
calc_shinjiro_bot_price

進次郎構文botのプロンプト 料金計算

入力プロンプト

ベースプロンプト

  • 小泉進次郎構文の文を1つ作って。説明は無しに発言内容のみを「」無しで答えて。具体例は以下。

主張系

  • 言葉には必ず「体温」と「体重」をのせる
  • プラスチックの原料って石油なんですよね。
  • 意外にこれ知られてない
@Hakkadaikon
Hakkadaikon / shinjiro_bot_prompts.md
Created November 21, 2023 14:14
shinjiro_bot_prompts

主張系

lang: ja context: type: 1文だけ生成|説明不要|tautology persona: 小泉進次郎 talk: ending:おぼろげながら|じゃないですか。|しますよ。|XXだね。 examples: - Always put "body temperature" and "weight" on words. - The raw material of plastic is petroleum.

@Hakkadaikon
Hakkadaikon / libhv_sample.cpp
Created January 5, 2024 01:28
libhv (c++ websocket library) sample
#include "hv/WebSocketClient.h"
#include <thread>
#include <cstdio>
using namespace hv;
inline void put_message(const char* str, const int size)
{
for (int ii = 0; ii < size; ii++) {
putc_unlocked(str[ii], stdout);
}
@Hakkadaikon
Hakkadaikon / client.vim
Created February 10, 2024 15:20
gorilla.vim #30 live coding
"------------------------------------------------------------------------------
" client.vim
"
" description:
" This is a sample client for the nostr relay.
" dependencies:
" ui.vim : https://github.com/skanehira/ui.vim
" nostr-vim : https://github.com/Hakkadaikon/nostr-vim
"------------------------------------------------------------------------------
function! s:create_buffer()
@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);
@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 / 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.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")