Skip to content

Instantly share code, notes, and snippets.

View mamemomonga's full-sized avatar

Shotaro Takahashi mamemomonga

View GitHub Profile
@mamemomonga
mamemomonga / wasabidns.md
Last active December 29, 2020 13:11
名前解決できないWasabiを解決できる専用DNSサーバをDockerとdnsmasqでつくるメモ

名前解決できないWasabiを解決できる専用DNSサーバをDockerとdnsmasqでつくるメモ

ひとまず名前解決できたという感じ

設定とか

$ cat > resolv.dnsmasq.conf << 'EOS'
nameserver 8.8.8.8
nameserver 8.8.4.4
EOS
@mamemomonga
mamemomonga / _README.md
Last active December 4, 2020 02:22
ssh_configのホスト名を検索するツール

ssh_configのホスト名を検索するツール

最近のssh clientでは ~/.ssh/config に Include conf.d/* とすることで、~/.ssh/conf.d 以下にユーザのconfigファイルを分離することができるようになった。 しかし、自分で設定したホストを憶えきれないので、検索するためのシンプルなシェルスクリプトを作成した。

ssh-hosts-find を引数なしで実行すると、一覧が表示される。引数をつけると、それをキーにしてgrepする

@mamemomonga
mamemomonga / BigSurIso.md
Last active October 15, 2021 00:53
Big SurのISOイメージを作成する

Big SurのISOイメージを作成する

bigsur.isoはVMware Fusionで利用でき、またEtcherなどでUSBメモリに書き込むと、クリーンインストール用のメディアとして利用できる。ちなみに一般的なMacBookでの起動時ディスク選択はoptionキーを押しながら電源ON

$ hdiutil create -o ./bigsur -size 20g -layout SPUD -fs HFS+J -type SPARSE
$ hdiutil attach ./bigsur.sparseimage -noverify -mountpoint /Volumes/installBigSur
$ sudo '/Applications/Install macOS Big Sur.app/Contents/Resources/createinstallmedia' --volume /Volumes/installBigSur
$ hdiutil detach '/Volumes/Install macOS Big Sur'

アンマウントできんかったらmacOS再起動

@mamemomonga
mamemomonga / _README.md
Last active November 2, 2020 09:12
Raspberry Pi3向け Debian10 aarch64 ビルドツール
@mamemomonga
mamemomonga / terraform-env.md
Last active August 18, 2020 14:30
terraform の出力をbash変数として利用する方法

terraform の出力をbash変数として利用する方法

jq, perlを使用する

main.tf の作成

$ cat > main.tf << 'EOS'
output env {
  value = {

VALUE1 = "the value1"

@mamemomonga
mamemomonga / jq-sort.md
Created August 16, 2020 16:30
jqをつかったソート

hoge.jsonの内容を整形

$ cat hoge.json | jq .
[
  {
    "id": 2,
    "name": "ゆかり"
  },

{

@mamemomonga
mamemomonga / 1998-summer-cassete.md
Last active August 10, 2020 11:36
1998年、夏のカセットテープ

1998年、夏のカセットテープ

MixCloud

トラックリスト

番号 曲名 アーティスト 発売日
1 シーズン・イン・ザ・サン Tube 1986年4月21日
2 夏の決心 大江千里 1994年8月1日
@mamemomonga
mamemomonga / main.tf
Last active July 27, 2020 03:52
terraformスニペット集
# main.tf
# ------------------------
# 設定
# ------------------------
locals {
# ドメイン
domain = "hoge.example.org"
# AWSプロファイル
@mamemomonga
mamemomonga / README.md
Last active July 27, 2020 00:46
IFTTTのWebHookをコマンドラインから実行する

IFTTT CLI

IFTTT Webhookを実行するperlスクリプトです。追加モジュールは必要ありませんが、curlが必要です。

WEBHOOK_KEY に自分のWebHook Keyを(Webhook KeyはWebHook画面の「Documentation」から確認できます)、 COMMANDS に サブコマンドとイベントを設定します。イベントは複数設定でき、連続して実行されます。

@mamemomonga
mamemomonga / jetson.txt
Created July 25, 2020 08:01
Jetson Nane メモ
Jetson nano(Ubunutu)
テキストモードログイン
sudo systemctl set-default multi-user.target
GUIログイン
sudo systemctl set-default graphical.target
手動GUI起動
sudo systemctl start gdm3.service