Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

mamemomonga mamemomonga

🏠
Working from home
View GitHub Profile
@mamemomonga
mamemomonga / 半額寿司が買えなくて.txt
Last active March 26, 2023 04:31
半額寿司が買えなくて
View 半額寿司が買えなくて.txt
「半額寿司が買えなくて」
作詞:なすーん
作曲:まめも
歌:初音ミク
♪=160
イントロ: DGDG
[1]
D
@mamemomonga
mamemomonga / install.md
Last active March 18, 2023 08:41
arduino-cliで各種Arduino Coreを一気にインストールする
View install.md

Arduino CLIインストール

こちら にまとめてあります

bash

$ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
$ echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
$ exec $SHELL
@mamemomonga
mamemomonga / MCP2221A.md
Last active March 9, 2023 01:00
MCP2221Aメモ
View MCP2221A.md
@mamemomonga
mamemomonga / 00_README.md
Last active December 29, 2022 10:22
systemd チートブック
View 00_README.md

systemd チートブック

systemctl

ユニットタイプが service の場合は .serviceを省略できる

サービス一覧の表示

$ systemctl
@mamemomonga
mamemomonga / generator.pl
Last active December 27, 2022 06:05
すべてのファイルを ../files にコピーするシェルスクリプトを生成する。ただし、フォルダがない場合は新たに作成し、拡張子がhtm,html,js,css,txtの場合はgzip圧縮し、拡張子.gzを追加する。
View generator.pl
#!/usr/bin/perl
# すべてのファイルを ../files にコピーするシェルスクリプトを生成する。
# ただし、フォルダがない場合は新たに作成し、
# 拡張子がhtm,html,js,css,txtの場合はgzip圧縮し、拡張子.gzを追加する。
use strict;
use warnings;
use File::Find;
use feature 'say';
@mamemomonga
mamemomonga / convert.pl
Created December 11, 2022 00:22
KORG Gadget2 -> SP-404MK2 インポート補助ツール: このファイルと同じところに置かれた全てのWAVファイルをffmpegを通して1階層上のIMPORTフォルダに出力する
View convert.pl
#!/usr/bin/env perl
# ---------------------------------------------
# このファイルと同じところに置かれた全てのWAVファイルを
# ffmpegを通して1階層上のIMPORTフォルダに出力する
# ---------------------------------------------
use strict;
use warnings;
use Cwd 'getcwd';
use feature 'say';
use File::Basename;
@mamemomonga
mamemomonga / NJM11100.pl
Last active December 8, 2022 01:54
NJM11100 抵抗コンビ電卓
View NJM11100.pl
#!/usr/bin/env perl
# -----------------
use strict;
use warnings;
use feature qw(say);
use Data::Dumper;
# NJM11100F1
# NMD(JRC) https://www.nisshinbo-microdevices.co.jp/ja/products/ldo-linear-regulator/spec/?product=njm11100
@mamemomonga
mamemomonga / dead_checker.pl
Created November 24, 2022 02:05
簡易死亡チェッカー
View dead_checker.pl
#!/bin/bash
set -eu
TARGET_HOST="監視するホスト"
PROWL_APIKEY="Prowlトークン"
PROWL_APPNAME="deadchecker"
hostAlive() {
ping -t 1 $TARGET_HOST > /dev/null 2>&1
echo $?
@mamemomonga
mamemomonga / nginx-wasabi.md
Last active November 20, 2022 09:56
Wasabiをnginxでプロクシする
View nginx-wasabi.md

Wasabiをnginxでプロクシする

  • Wasabiの出力をnginxでプロクシして media.example.com から出力する
  • Wasabiのリージョンは us-east-2

mastodonの .env.production 設定例

S3_ENABLED=true
S3_BUCKET=Wasabiのバケット名
@mamemomonga
mamemomonga / gifv.pl
Last active November 17, 2022 03:00
マストドンとかへの投稿に便利なGIFV(音声なしMP4)動画を作るツール。要ffmpeg
View gifv.pl
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use File::Basename;
sub usage() {
say "";
say "[USAGE]";
say " $0 [INFILE]";