Skip to content

Instantly share code, notes, and snippets.

View mamemomonga's full-sized avatar

Shotaro Takahashi mamemomonga

View GitHub Profile
@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イツ廃
パクリタイツ→タイツ泥棒
@mamemomonga
mamemomonga / _README.md
Last active July 2, 2023 02:54
ブラウザ拡張を使ってリタイーツをさらに便利にする

タイッツー拡張: ブラウザ拡張を使ってリタイーツをとりあえずそれっぽく動くようにする

タイッツーのリタイーツボタンをとりあえず使えるようにするユーザスクリプトです。 この機能は内部が変わると動作しなくなる場合があります。タイッツーは現在鋭意開発中なため、すぐに使えなくなる可能性があります。ご了承ください。 7月2日 0:00 現在は利用可能です。

インストール方法

@mamemomonga
mamemomonga / retaittsuu.sh
Last active July 1, 2023 13:55
リタイッツツール(macOS専用)
#!/bin/bash
set -eu
# リタイーツ ツール(macOS専用)
# [使い方]
# 1.リタイーツしたいメッセージをコピーする
# 2.retaittsuu.shを実行する
# 3.ペーストして投稿する
BUFFER=$(pbpaste)
@mamemomonga
mamemomonga / thumbprint.sh
Created June 15, 2023 18:37
GitHubのOpenID Connect ID プロバイダーのサムプリントの取得
#!/bin/bash
set -eux
# GitHubのOpenID Connect ID プロバイダーのサムプリントの取得
# 参考URL
# https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/id_roles_providers_create_oidc_verify-thumbprint.html
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
# https://qiita.com/minamijoyo/items/eac99e4b1ca0926c4310
PROVIDER_URL="https://token.actions.githubusercontent.com"
JWKS_URL=$(curl -s "$PROVIDER_URL/.well-known/openid-configuration" | jq -r .jwks_uri)

さくらのクラウドシェルでコピペ一発で「俺環境」を準備する

以下をコピペする

curl -L https://gist.githubusercontent.com/mamemomonga/4663dde65896402ca99a13d63afbeb64/raw/9045827bae598b3658f21204027ef0831d39358e/setup.sh | sudo bash