Skip to content

Instantly share code, notes, and snippets.

@Lycolia
Lycolia / startup.bat
Created April 7, 2026 01:25
Windows startup batch
rem Ubuntuにkeychainを起動時に打ち込んでおくため(VSCode起動時に多窓でターミナルが上がるとkeychainが壊れて面倒なため)
start ubuntu
rem 日報などのシェルスクリプトを蹴る用。callで*.cmdを呼ばないと処理が戻ってこないのでcallが必須
call C:/env/msys64/run_zsh.cmd '/c/path/to/hoge.sh'
rem エラーメッセージとかの確認用
pause
@Lycolia
Lycolia / daily.sh
Last active April 20, 2026 01:44
日時作業フォルダと日報ファイル作成スクリプト
#!/bin/bash
createSummeryFile() {
local destPath=$1
local title=$2
cat << EOF > ${destPath}/summary.md
# ${title}
## やったこと
@Lycolia
Lycolia / GraphemeTool.js
Created March 18, 2026 22:02
サロゲートペアやリガチャを含めた文字列の長さを取ったり、切り落とすためのユーティリティ
export class GraphemeTool {
private segment: Intl.Segmenter;
constructor() {
this.segment = new Intl.Segmenter(undefined, { granularity: 'grapheme' });
}
private spread(value: string) {
return [...this.segment.segment(value)].map((item) => {
return item.segment;
@Lycolia
Lycolia / Karabiner-Elements.json
Created February 28, 2026 18:15
Windows like styling Karabiner-Elements.json
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "VS Codeが前面にあるとき、左Control+@をターミナルトグルとして機能させる",
"manipulators": [
{
"conditions": [
@Lycolia
Lycolia / incorrect-string.length-character-array.txt
Last active September 17, 2025 08:44
正常な文字数判定ができない文字列(合字・リガチャ)
👨‍👩‍👧‍👨‍👩‍👧‍👨‍👩‍👧‍👨‍👩‍👧‍
あ゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙゙
い゚゚゚゚゚゚゚゚゚゚
@Lycolia
Lycolia / recording.ps1
Created September 2, 2025 14:52
Recording the speaker and own microphone
###########################################################
#
# 自分のマイク入力とスピーカー出力を合成して録音するスクリプト
# オンライン会議の録音などに
#
############################################################
Write-Host "録音処理を開始する場合、何かキーを押して下さい..." -NoNewLine
[Console]::ReadKey($true) > $null
$input="Microphone (Sound BlasterX G1)"
@Lycolia
Lycolia / gemini_manifold.py
Created May 15, 2025 23:59
Open WebUI Gemini Manifold Pipe
"""
title: Gemini Manifold Pipe
author: justinh-rahb
author_url: https://github.com/justinh-rahb
funding_url: https://github.com/open-webui
version: 0.1.4
license: MIT
"""
import os
@Lycolia
Lycolia / index.js
Last active February 22, 2024 16:00
Error handling benchmark at JavaScript
const errorObject = (param) => {
if (param === true) {
return {
isError: false,
payload: 'TRUE',
};
} else {
return {
isError: true,
payload: 'ERR',
@Lycolia
Lycolia / misskey-notes-remover.php
Last active April 7, 2026 01:28
Misskey notes remover
<?php
# =====================================================
# Confirmed work with Misskey 13.12.2
# Requires openssl extension and PHP 7.4.0 or later
# Edit php.ini
# ;extension=openssl -> extension=openssl
# =====================================================
set_time_limit(0);
# ==================== Config Start ===================
@Lycolia
Lycolia / index.html
Last active May 22, 2023 18:53
Create Slack reminder command utillity
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Slack Reminder Creator</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<script>
const inputState = {
chName: '',