Skip to content

Instantly share code, notes, and snippets.

View ryoppippi's full-sized avatar
🪀
yoyo

ryoppippi ryoppippi

🪀
yoyo
View GitHub Profile
@ryoppippi
ryoppippi / deno.json
Last active May 24, 2024 09:28
OpenAI JSON mode with zod schema (Based on this article https://tech.algomatic.jp/entry/2024/05/23/140219)
{
"imports": {
"openai": "npm:openai@^4.46.0",
"zod": "npm:zod@^3.23.8"
}
}
@ryoppippi
ryoppippi / router-gen.ts
Created September 25, 2023 13:11 — forked from HugeLetters/router-gen.ts
SvelteKIt type-safe router
import { writeFile } from 'fs/promises';
import { glob } from 'glob';
import { format } from 'prettier';
import { watch } from 'chokidar';
export default async function generateRoutes() {
const routes = await glob('./src/routes/**/+page.svelte', { withFileTypes: true }).then((files) =>
files
.filter((file) => file.isFile())
.sort((a, b) => (a.path > b.path ? 1 : -1))
@ryoppippi
ryoppippi / copilot.fish
Created March 25, 2023 13:26
Copilot CLI for fish
function github-copilot_helper
set -l TMPFILE (mktemp)
trap 'rm -f $TMPFILE' EXIT
if github-copilot-cli $argv[1] "$argv[2..]" --shellout $TMPFILE
if [ -e "$TMPFILE" ]
set -l FIXED_CMD (cat $TMPFILE)
eval "$FIXED_CMD"
else
echo "Apologies! Extracting command failed"
end
@ryoppippi
ryoppippi / 3.bf
Last active August 2, 2022 15:02
>>>+++++++++[<++++++++++>-]<<<[-]>>[<<+>>>+<-]>[-]+<<[-]>>[<<+>+>-]<[-]<[>+>+<<-]>>[<<+>>-]<<<[>>>+>+<<<<-]>>>>[<<<<+>>>>-]<[-<[>>+>+<<<-]>>>[<<<+>>>-]+<[<<->>>-<[-]]>[<<[-]>>-]<<]+<[>-<[-]]>[<<[>+>>+<<<-]>>>[<<<+>>>-]+++<<[>>->+<[>>+>+<<<-]>>>[<<<+>>>-]+<[>-<[-]]>[<<[<+>-]>>-]<<<<<-]>>[-]>[<<<->>>-]+<<<[>>>-<<<[-]]<[>+>>+<<<-]>>>[<<<+>>>-]++++++++++<<[>>->>+<<[>>>+>+<<<<-]>>>>[<<<<+>>>>-]+<[>-<[-]]>[<<[<<+>>-]>>-]<<<<<<-]>>[-]<<+++>>>>[<<<<->>>>-]+<<<<[>>>>-<<<<[-]]>>>[<<<+>>>[-]]>[<<<<+>>>>[-]]<<<<[>>>>+<<<<[-]]+>>>>[>+++++++[<<<++++++++++++++>>>-]<<<.[-]>>>++++++++[<<<++++++++++++>>>-]<<<+.[-]>>>+++++++++[<<<++++++++++++>>>-]<<<-.[-]>>>++++++++[<<<++++++++++++>>>-]<<<+.[-]<<->>>>[-]]<<<<[<[>>>>>+<<+<<<-]>>>[<<<+>>>-]++++++++++>>[-<<->>>+<<<[>>>>+>+<<<<<-]>>>>>[<<<<<+>>>>>-]+<[>-<[-]]>[<<[<<<+>>>-]>>>+<-]<<<]>[>>>>>+<<<<<-]>>>[<<<<+>>>>-]<<<<<<[-]++++++++++>>[-<<->>>+<<<[>>>>+>+<<<<<-]>>>>>[<<<<<+>>>>>-]+<[>-<[-]]>[<<[<<<+>>>-]>>>+<-]<<<]>[>>>>+<<<<-]>>>[++++++++++++++++++++++++++++++++++++++++++++++++.<+>>
#include QMK_KEYBOARD_H
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
#ifdef SSD1306OLED
#include "ssd1306.h"
#endif
@ryoppippi
ryoppippi / delete.py
Last active April 17, 2020 02:35
twitter deleter
import pyautogui as pgui
import subprocess
from time import sleep
if __name__ == "__main__":
subprocess.call(["say", "キャリブレーション"])
sleep(3)
select_p = pgui.position()
pgui.click(select_p)
@ryoppippi
ryoppippi / aria_test.ipynb
Created April 14, 2019 15:57
aria_test.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryoppippi
ryoppippi / callback.php
Created July 10, 2017 08:03
Line Bot 題名「そうなんですね!へ〜、そうなんだ〜!!」 #CodePiece #euler
<?php
$accessToken = '';
//ユーザーからのメッセージ取得
$json_string = file_get_contents('php://input');
$json_object = json_decode($json_string);
//取得データ
$replyToken = $json_object->{"events"}[0]->{"replyToken"}; //返信用トークン
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryoppippi
ryoppippi / Lecture8-1.ipynb
Last active May 29, 2017 08:43
Lecture8-1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.