Skip to content

Instantly share code, notes, and snippets.

View mamemomonga's full-sized avatar
🏠
Working from home

Shotaro Takahashi mamemomonga

🏠
Working from home
View GitHub Profile
@mamemomonga
mamemomonga / StableDiffusionWebUIForge.md
Last active April 12, 2024 11:36
ちょっとしたゲーミングPCでも使えるStable Diffusion WebUI Forgeの利用方法

Stable Diffusion WebUI Forge メモ

ちょっとしたゲーミングPCでも使えるStable Diffusion WebUI Forgeの利用方法

当方の環境

  • Intel i7-4770K
  • NVIDIA GeForge GTX 1660 Super Mem:6GB
  • Mem: 32GB, Windows 10 Pro
@mamemomonga
mamemomonga / tmux_new_cd.sh
Last active April 8, 2024 04:48
現在のtmuxで新しいウィンドウを開き、cdコマンドでパスを移動するスクリプト
#!/bin/bash
set -eu
# 現在のtmuxで新しいウィンドウを開き、cdコマンドでパスを移動するスクリプト
if [ -z "${TMUX:-}" ]; then
echo "tmuxを起動してください"
exit 1
fi
export TMUX
@mamemomonga
mamemomonga / dialog.sh
Created April 2, 2024 23:15
macOSとシェルスクリプトでダイアログを表示する
#!/bin/bash
# macOSとシェルスクリプトでダイアログを表示する
set -eu
osadialog() {
local text=$1
set +e
osascript 2>&1 > /dev/null << EOS
tell me
activate
@mamemomonga
mamemomonga / _README.md
Last active March 11, 2024 11:25
AirPlayデバイスのホスト名を特定するシェルスクリプト

find-airplay-host.sh

  • AirPlayデバイスのホスト名を特定するシェルスクリプトです。
  • macOS用。
  • カレントディレクトリに list_names.txt, instances.txt が作成されます。

使い方

「屋根裏部屋」がターゲットのAirPlayデバイスだとします。

@mamemomonga
mamemomonga / pi5-status.pl
Created February 21, 2024 02:56
Raspberry Pi5のいくつかの情報をvcgencmdから取得して見やすく表示するツール
#!/usr/bin/env perl
# Raspberry Pi5のいくつかの情報をvcgencmdから取得して見やすく表示するツール
# --------------------
# 主な使い方
# $ watch ./pi5-status.pl
# --------------------
use strict;
use warnings;
use feature 'say';
@mamemomonga
mamemomonga / _README.md
Last active October 19, 2023 03:26
ffmpegを使ったビデオコンバータ

ffmpegで私がよく使うかもなコンバートスクリプト

  • MP4形式で出力
  • 29.97fpsインターレスを59.94fpsプログレッシブに変換
  • 5.1chは2chにダウンミックス
  • $OUTPUTDIR に出力される

使用例

マストドン投稿に最適なGIFVを作成する(オーディオなし,720p, AVC 4Mbps)

@mamemomonga
mamemomonga / cd-longlonglong.sh
Created October 2, 2023 08:52
長いパスのショートカットを作る
#!/bin/bash
# https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced
is_sourced() {
if [ -n "$ZSH_VERSION" ]; then
case $ZSH_EVAL_CONTEXT in *:file:*) return 0;; esac
else # Add additional POSIX-compatible shell names here, if needed.
case ${0##*/} in dash|-dash|bash|-bash|ksh|-ksh|sh|-sh) return 0;; esac
fi
return 1 # NOT sourced.
@mamemomonga
mamemomonga / CH32V003.md
Last active September 22, 2023 02:50
CH32V003 Arduinoメモ
@mamemomonga
mamemomonga / hoshi-uranai.pl
Last active August 26, 2023 23:05
今日の星占い
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use utf8;
binmode(STDIN, ":utf8");
binmode(STDOUT,":utf8");
binmode(STDERR,":utf8");
my $uranai_data;
@mamemomonga
mamemomonga / _README.md
Created July 6, 2023 02:24
タイッツー用語集

タイッツー用語集

タイッツーユーザー→タイッツァーorタイツァーorタイッツラーor着用者
フォロー数→デニール数
フォロワー数→デニーラー数
FF→デニデニ
片思いF→未開封
ブロ解→デンセン
タイツ廃人→タイ廃orイツ廃
パクリタイツ→タイツ泥棒