Skip to content

Instantly share code, notes, and snippets.

@hytdsh
hytdsh / vscode-go-lang.md
Created January 14, 2024 13:44
VSCode Go lang
The "gopls" command is not available. Run "go install -v golang.org/x/tools/gopls@latest" to install.
Tools environment: GOPATH=/go
Installing 7 tools at /go/bin
  gopls
  gotests
 gomodifytags
@hytdsh
hytdsh / how-to-use-aws-ses.md
Last active December 6, 2023 07:02
AWS SESの使い方

SESでメールを送信する

1st step

「設定を始める」はいまいち使いづらいのでスキップする。

2nd step

「検証済みID」から始める。

@hytdsh
hytdsh / dind-rootless.md
Created October 9, 2023 09:01
dind and dind-rootless on Rootless Docker
rootless@rootless:~$ ls -l /var/run/user/1001/docker.sock
srw-rw---T 1 rootless 166532 0 Oct  9 17:55 /var/run/user/1001/docker.sock
rootless@rootless:~$ cat dind/compose.yml
version: "3"

services:
 dind:
@hytdsh
hytdsh / dind-rootfull.md
Last active October 9, 2023 08:04
dind and dind-rootless on Rootfull Docker
root@rootfull:~# pwd
/root
root@rootfull:~# ls -l /var/run/docker.sock
srw-rw---- 1 root docker 0 Oct  5 20:15 /var/run/docker.sock
root@rootfull:~# cat tmp/dind/compose.yml
version: "3"
@hytdsh
hytdsh / openint-docker-entrypoint.md
Created October 1, 2023 03:40
Open Interpreter を Docker の ENTRYPOINT に書く
$ cat Dockerfile
FROM debian:stable-slim

#
# as root
#
USER root
WORKDIR /root
@hytdsh
hytdsh / README.md
Last active August 29, 2023 13:37
AWS で Docker を Rootless で動かしアプリを展開する

概要

本稿の手順を実施することで

  • インスタンスのブート時に Rootless モードの Docker エンジンサービスの開始と同時に、任意の compose.yml 構成を開始する。

が実現できる。

ベースとして AWS EC2 の Debian 12 インスタンスを使用する。

@hytdsh
hytdsh / vscode-attach.md
Last active February 22, 2023 00:45
vscode-attach.md

vscode-attach-1 vscode-attach-2 vscode-attach-3 vscode-cannot-attach-1 vscode-cannot-attach-2

@hytdsh
hytdsh / gist:d53f654e042ca1b8a31a7020df809027
Created December 8, 2022 15:02
自分自身を保存するJavascriptに関するキーワード
javascript ファイル名を指定して保存 ダイアログ
https://www.google.com/search?q=javascript+%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%A6%E4%BF%9D%E5%AD%98+%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AD%E3%82%B0
https://www.nightswinger.dev/2021/12/save-text-file-with-showsavefilepicker/
html javascript download myself
https://www.google.com/search?q=html+javascript+download+myself
https://qiita.com/mogamoga1337/items/0dab1c4d9534c9f83528
@hytdsh
hytdsh / systemd_on_WSL.md
Created November 30, 2022 13:40
systemd on WSL

いわゆる「インボックス版」なwslの状態から、

> wsl --update

を実行して、

> wsl --version
WSL バージョン: 1.0.0.0
カーネル バージョン: 5.15.74.2
WSLg バージョン: 1.0.47
@hytdsh
hytdsh / rspec.log
Created January 23, 2020 01:24
Devise と OmniAuth のテストが失敗する件
$ bundle exec rspec
.....
[14, 23] in /home/vagrant/work/todostacks/spec/requests/pages_spec.rb
14: Rails.application.env_config["omniauth.auth"] = OmniAuth.config.mock_auth[:google_oauth2]
15: get user_google_oauth2_omniauth_authorize_url
16: end
17: it "GoogleのOAuth認証を通過していれば / へのアクセスが 200 で応答する" do
18: byebug
=> 19: expect(response).to have_http_status(200)
20: end