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 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
@mamemomonga
mamemomonga / ssh-host-ls.pl
Created July 21, 2020 06:01
.ssh/cofnig の Hosts一覧を表示する
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
sub file_read {
my ($filename)=@_; my $buf="";
open(my $fh,'<',$filename) || die "$filename - $!";
local $/; $buf=<$fh>;
return $buf;
@mamemomonga
mamemomonga / ssh-host-ls.pl
Created July 21, 2020 06:01
.ssh/cofnig の Hosts一覧を表示する
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
sub file_read {
my ($filename)=@_; my $buf="";
open(my $fh,'<',$filename) || die "$filename - $!";
local $/; $buf=<$fh>;
return $buf;
@mamemomonga
mamemomonga / _README.md
Last active April 6, 2022 03:04
hdiutilを簡単に使うためのスクリプトです

diskimage-creator.pl

hdiutilを簡単に使うためのスクリプトです。macOSでディスクイメージを作るのに便利です。

セットアップ

$ curl -Lo ./diskimage-creator https://gist.githubusercontent.com/mamemomonga/f931e1c23a3e1c27a5a3ba89e92c1ab4/raw/diskimage-creator.pl
$ chmod 755 ./diskimage-creator

使い方