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 / docker-gitlab.md
Last active September 1, 2022 08:21
GitLab を docker-composeで動かす例
  • 192.168.1.101 ホストのIPアドレス
  • 192.168.1.100 ホストのIP-AliasのGitLab専用のIPアドレス
  • gitlab.example 自宅のDNSで解決できるようにしておく
  • ホストのsshdのIPアドレスを明示する

/etc/network/interfaces (Debian系)

auto ensXXX
iface ensXXX inet static
@mamemomonga
mamemomonga / audio2mp4.sh
Last active August 27, 2022 18:36
オーディオを動画にするスクリプト
#!/bin/bash
set -eu
# フォントの関係でmacOS専用
if [ -z "${1:-}" ]; then
echo "USAGE:"
echo " $0 [AUDIO FILE]"
echo ""
exit 1
@mamemomonga
mamemomonga / gist:6de2c50b226a090e11ad4fae4192aa4b
Created July 28, 2022 22:43
シティーポップスコレクション Vol.1 (2020/05/17)

シティーポップスコレクション Vol.1 (2020/05/17)

MixCloud

Tr Title Artist
1 真夜中のドア-Stay With Me 松原みき
2 HOLD ME TIGHT ラジ
3 シンプル・ラブ 大橋純子
4 街のドルフィン 濱田金吾
@mamemomonga
mamemomonga / AssumeUDPEncapsulationContextOnSendRule.reg
Created June 21, 2022 02:26
WindowsクライアントからNAT-Tデバイスの背後に設置したL2TP/IPsecサーバに接続する
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent]
"AssumeUDPEncapsulationContextOnSendRule"=dword:00000002
@mamemomonga
mamemomonga / Makefile
Created June 12, 2022 15:40
ArduinoCLI + ESP32 + FFAT
# --------------------------------------
# Arduino-CLI + ESP32 + FFAT
# --------------------------------------
# http://marc.merlins.org/perso/arduino/post_2019-03-30_Using-FatFS-FFat-on-ESP32-Flash-With-Arduino.html
# https://github.com/marcmerlin/esp32_fatfsimage/blob/master/README.md
# https://github.com/labplus-cn/mkfatfs
# https://github.com/lorol/arduino-esp32fs-plugin
# https://github.com/marcmerlin/arduino-esp32/tree/master/libraries/FFat/examples/FFat_Test
# --------------------------------------
@mamemomonga
mamemomonga / RasPico.md
Last active May 7, 2022 17:03
Raspberry Pi Picoメモ
@mamemomonga
mamemomonga / prowl-notify.sh
Created April 3, 2022 03:31
prowlによるシンプルな通知
#!/bin/bash
set -eu
# 使い方
# ./prowl-notify.sh "こんにちは"
# https://www.prowlapp.com/
PROWL_APIKEY=ここにAPIキーを書く
curl -X POST -d 'apikey='"$PROWL_APIKEY"'&application=something&priority=-1&event='"$1"'' \
@mamemomonga
mamemomonga / git-remote-rename.pl
Last active March 17, 2022 13:46
カレントディレクトリ以下に含まれるGitのリモートリポジトリのホスト名を一括して書き換える。
#!/usr/bin/env perl
# -------------------------------------
# 要 IO:All (cpanm install IO::All)
# 必ずバックアップを行ってから実行すること
# -------------------------------------
use strict;
use warnings;
use feature 'say';
use File::Find;
@mamemomonga
mamemomonga / _README.md
Last active April 28, 2022 01:46
tmux利用中にそのウィンドウのカレントディレクトリに移動した新しいウィンドウを開くスクリプト

セットアップ

$ curl -L https://gist.githubusercontent.com/mamemomonga/6a1e7a871869ed73ca845c789dced6f5/raw/cd19e1b5555480a29ce73bdd679a11b5eca2f2f4/tmux-open-pwd > tmux-open-pwd
$ chmod 755 tmux-open-pwd

使用例

1つ開く

@mamemomonga
mamemomonga / mysql-wait.pl
Last active March 5, 2022 08:53
docker-compose up -d でMySQL(5.7.37) db の初期化を待つ
#!/usr/bin/env perl
# ------------------------------------------
# docker-compose up -d でMySQL(5.7.37) db の初期化を待つ
# Goで作り直しました https://github.com/mamemomonga/mysql-docker-wait-initalize
# ------------------------------------------
use strict;
use warnings;
use feature 'say';
use Symbol 'gensym';
use IPC::Open3;