Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【令和最新版】使ってるツールスタック #54

Open
oratake opened this issue Aug 21, 2023 · 3 comments
Open

【令和最新版】使ってるツールスタック #54

oratake opened this issue Aug 21, 2023 · 3 comments
Assignees

Comments

@oratake
Copy link
Owner

oratake commented Aug 21, 2023

バージョン管理

asdf

※ 注意: 最近asdfのRust実装、rtxをつかってるので以下のほうをみる

getting startedの通りインストール

homebrewとpacmanが楽そうなので基本Archならpacman、それ以外はbrewで入れとく。

使い方

$ asdf plugin add php # これでPHPのプラグイン入る
$ asdf list-all php # 入れられるPHPのリスト表示
$ asdf install php 8.2.9 # このバージョンは8.2とか曖昧だと入らないっぽい

php(8.2.9)入れるときに追加でapt install必要だったやつ

$ sudo apt install bison re2c libssl-dev libsqlite3-dev # これ途中で以下みつけて解決

libssl-devはopensslのエラーで入れたやつ。参考ここ

asdf phpのreadmeにあらかじめ依存関係いれとけよみたいな話シレッとかいてあったっぽい。
githubのactionsっぽいworkflowに答え書いてあった。そのままaptの部分書けばよさそう
https://github.com/asdf-community/asdf-php/blob/master/.github/workflows/workflow.yml

rtx

ggラビリティ悪いのほんとなんとかしてくれなんだrtxって

install のコマンドが使いやすそうな感じする。 node@lts とかでファジーマッチングするよみたいな話書いてある

よくつかう

$ rtx install node@lts
$ rtx use -g node@18 # このときltsが18.17.1なのでこれでfuzzyに選んでくれる
@oratake oratake self-assigned this Aug 22, 2023
@oratake
Copy link
Owner Author

oratake commented Aug 23, 2023

Rust

インストール方法では rustup で入れてねと言われている
そのrustupはどこから入れるか問題はあるが、とりあえずパッケージマネージャ等は使わずに大本営のワンライナー使う

https://forge.rust-lang.org/infra/other-installation-methods.html#other-ways-to-install-rustup

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

インストールの際は上記リンクから最新のものを確認
選択肢は 1) proceed with install (default) を選択

cargo, rustc, rustup とかが一発で入るっぽい

@oratake
Copy link
Owner Author

oratake commented Aug 26, 2023

Neovim

AstroNvim

最近はこれにハマっている
Ubuntuの場合aptで入れるneovimは古くてastronvimが起動しないので、brewとかで入れておく

neovimインストール後、dotfilesのmakeでastronvim用のもろもろをする
起動後、勝手にいろいろインストールしてくれる

LSP

:Mason LSPなに入ってるか確認

よく使う機能

  • Space+ff ファイル名ファジー検索
  • Space+fw ワードファジー検索
  • Space+fb バッファ検索
  • Space+e サイドパネル開閉
    • <, > でパネル内の切り替え(ファイルツリー,バッファ,git)

参考: 紹介記事
VSCodeが物足りない人へ AstroNvimの紹介 - zenn
AstroNvimをセットアップしてみた - zenn
AstroNvim を使おう! - Speaker Deck

@oratake
Copy link
Owner Author

oratake commented Sep 3, 2023

MyDNS (DDNS)

DDNSの通知設定
Linuxで通知する設定
crontabじゃなくsystemdのtimer使った方法

手順

MyDNSのIP更新手順を参考に

/etc/systemd/system/mydns.service

[Unit]
Description=MyDNS IP Update

[Service]
Type=oneshot
ExecStart=/usr/bin/sh -c 'curl -u masterID:password https://ipv4.mydns.jp/login.html'

/etc/systemd/system/mydns.timer

[Unit]
Description=Run mydns.service at 01:00

[Timer]
OnCalendar=01:00

[Install]
WantedBy=timers.target

タイマーのセット、有効化

$ sudo systemctl start mydns.timer
$ sudo systemctl enable mydns.timer

startしたあとに時間とか変更加えたら

$ sudo systemctl daemon-reload

行けたらこのへんで確認
https://www.mydns.jp/members/#loginfo

mydnsは24時間以内に複数通信があっても最初の通信しか残らないっぽいので、journalctlとかで通信時のログ確認するのがいいかも
一応htmlで返答がきてるっぽくてlogにそのままべろんと出ている

参考

https://wiki.archlinux.jp/index.php/Systemd/タイマー

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant