Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import argparse
import json
import logging
import re
import subprocess
import sys
import tempfile
import time
断言します
何度も言うけど人
トレーダー
日本市場のエキスパート
投資ブロガー
殿堂入りアナリスト
が言及したブロガー
bnc.lt
拡散禁止
お金配ります
# ksks
https://x.com/9PnZroairOh7sne
https://x.com/0322Tco
https://x.com/9219762tetsu
https://x.com/989441041
https://x.com/anyakasu
https://x.com/aoonisukidesu1
https://x.com/aruarumada
https://x.com/best1_movies
https://x.com/best1_movies
// ==UserScript==
// @name ツイートボタン for Misskey
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Misskeyのノート投稿画面にツイートボタンを追加します
// @author Hidegon
// @match https://misskey.io/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=misskey.io
// @grant none
// ==/UserScript==
@HidegonSan
HidegonSan / main.cpp
Last active February 13, 2023 10:34
Ro-maji C++
// (C) 2023 Hidegon. Licensed under the MIT License
// Thanks: https://qiita.com/t-yama-3/items/7cba573b4cf23322dfc8
// 正しく文字を切り出す
char *_u8slice(char *buf, const char *str, u32 begin, u32 end) {
u32 count = 0;
char *p = buf; // returnするポインタを格納
while (*str != '\0') {
if ((*str & 0xC0) != 0x80) {
count++;
@HidegonSan
HidegonSan / surround.py
Created February 12, 2023 06:56
surrounds text
def surround_text(text: str, emojis: list) -> str:
ret = ""
emoji_len = len(emojis)
for i in range(-emoji_len, emoji_len + 1):
used_emoji = emojis[:emoji_len - abs(i) + 1]
left = "".join(used_emoji)
middle = used_emoji[-1]*(len(text) + (emoji_len - len(used_emoji))*2)
right = "".join(used_emoji[::-1])
ret += (left + (text if i == 0 else middle) + right) + "\n"

Keybase proof

I hereby claim:

  • I am hidegonsan on github.
  • I am hidegon (https://keybase.io/hidegon) on keybase.
  • I have a public key ASAbV2ei6_dk3FcVfiUPYtm1q5duytiCJ4O2_8XSjsMAaAo

To claim this, I am signing this object:

@HidegonSan
HidegonSan / unshorts.js
Last active August 8, 2022 02:34
Bookmarklet to unshorts, stop playback in the original window, and playback from the same time in a new window.
javascript:v=document.getElementsByTagName("video")[1];v.pause();open(`${location.href.replace("shorts/","watch?v=")}&t=${v.currentTime}s`,"_blank")