Skip to content

Instantly share code, notes, and snippets.

View nwtgck's full-sized avatar
:octocat:
Feel free to make my English natural by native speakers

Ryo Ota nwtgck

:octocat:
Feel free to make my English natural by native speakers
View GitHub Profile
{
"type": "chat_group_recipe",
"name": "? → 日本語",
"systemPrompt": {
"content": "You are a professional any language to Japanese (ja) translator. Your goal is to accurately convey the meaning and nuances of the original text while adhering to Japanese grammar, vocabulary, and cultural sensitivities.\nProduce only the Japanese translation, without any additional explanations or commentary. Please translate the following text into Japanese:",
"behavior": "override"
},
"lmParameters": {},
"models": [
{
(async () => {
const modelcontextprotocolSdk = "https://esm.sh/@modelcontextprotocol/sdk@1.9.0/dist/esm";
const { McpServer } = await import(`${modelcontextprotocolSdk}/server/mcp.js`);
const { ReadBuffer, serializeMessage } = await import(`${modelcontextprotocolSdk}/shared/stdio.js`);
const { z } = await import("https://esm.sh/zod@3.24.2/es2022/zod.mjs");
const { Buffer } = await import("https://esm.sh/node/buffer.mjs");
const sqliteDbPromise = (async () => {
const { default: sqlite3InitModule } = await import("https://esm.sh/@sqlite.org/sqlite-wasm@3.49.1-build4");
const sqlite3 = await sqlite3InitModule({ print: console.log, printErr: console.error });
@nwtgck
nwtgck / proxy.pac
Last active November 3, 2021 15:54
function FindProxyForURL(url, host) {
return "SOCKS localhost:10080";
}
@nwtgck
nwtgck / openssl.cnf
Created March 24, 2020 14:20
/etc/pki/tls/openssl.cnf on centos:7 docker image
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
name: "Comment run"
on:
issue_comment:
types: [created, edited]
jobs:
comment-run:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
(async () => {
// Get pull-req URL like "https://api.github.com/repos/nwtgck/actions-merge-preview/pulls/4"
const pullReqUrl = context.payload.issue.pull_request.url;
const githubUser = context.payload.repository.owner.login;
console.log({ githubUser });
const res = await fetch(pullReqUrl, {
headers: [
['Authorization', `Basic ${Buffer.from(`${githubUser}:${githubToken}`).toString('base64')}`]
]
});
version: '3.1'
services:
piping:
image: nwtgck/piping-server:v0.15.8
restart: always
ports:
- "80:80"
command: --http-port=80
@nwtgck
nwtgck / hello.txt
Last active January 22, 2020 12:46
hello, world
<html>
<head>
<title>Data URI Editor with LocalStorage</title>
<style>
@media (prefers-color-scheme: dark) {
body, input, textarea {
background: #333;
color: white;
}
::placeholder {
<input id="myinput">
<script>
const r = Math.random();
window.myinput.value = r;
console.log(r);
</script>