# 202008 ## `grep host /var/log/auth.log | awk 'match($0, /r?host=[0-9.]*/) {print substr($0, RSTART, RLENGTH)}' | sort | uniq` ## [±12V出力非絶縁DCDCコンバータ TPS65131使用: 組立キット 秋月電子通商-電子部品・ネット通販](http://akizukidenshi.com/catalog/g/gK-12337/) ## [A SW Keyer for remote operations - IW7DMH - Ham Radio Station](https://iw7dmh.jimdofree.com/utilities-for-remote-operations/sw-keyer-for-remote-operations/) ## 新東名から修善寺専用道路にいくには - 新東名を長泉沼津で降りて三島方面.国道1号. - 3分岐は真ん中の道路(2020). ## slack api でtokenを使ってサクッとpost - `curl -XPOST -d 'token=xoxb-xxx-xxx-xxxxxx' -d 'channel=noc-alerts' -d 'text=Hello World' -d 'icon_emoji=rotating_light' -d 'name=hoge' 'https://slack.com/api/chat.postMessage'` ## postgresqlのcache hit率の改善 ``` $ vim /etc/postgresql/10/main/postgresql.conf #------------------------------------------------------------------------------ # RESOURCE USAGE (except WAL) #------------------------------------------------------------------------------ # - Memory - # shared_buffers = 128MB # min 128kB shared_buffers = 1GB # min 128kB # (...snip...) # - Planner Cost Constants - # (...snip...) #effective_cache_size = 4GB effective_cache_size = 1GB # (...snip...) $ systemctl restart postgresql $ systemctl status postgresql ``` ## sshするとき複数のkeyを使う場合 `-i` でいちいちkeyしていするのが面倒 - Hostに書くのがまともだけど,もはや2コくらいあったりしてデフォルトにしていいときは雑に ``` % cat ~/.ssh/config IdentityFile ~/.ssh/id_rsa IdentityFile ~/.ssh/id_ecdsa521 ``` 的に書いてしまう手もなくはないかも.ただgitではうまく動かなかったり,失敗時に再試行をするような動きをする場合にfail2ban等でjailに入ることがあることは頭に入れておく必要がある.やはりHostsとして一つずつ書くことが望ましそうである. というかそもそもkeyは1つにしておきたいものである.もはや余計なセキュリティ的リスクを背負っていることになる. ## [やってみようDNSSEC (自分で頑張りたい方へ):IIJ DNSプラットフォームサービスのスゴいところ(第5回) | IIJ Engineers Blog](https://eng-blog.iij.ad.jp/archives/5739) - [https://dnssec.jp/wp-content/uploads/2011/08/20110420-dnssec-rollover_key-nakashima.pdf](https://dnssec.jp/wp-content/uploads/2011/08/20110420-dnssec-rollover_key-nakashima.pdf) ## [ArcGIS Dashboards](https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd40299423467b48e9ecf6) ## [本当に使ってよかったOpenAPI (Swagger) ツール | フューチャー技術ブログ](https://future-architect.github.io/articles/20191008/) ## wheel, adm, sudoの使い分けってどうなっているのか. ## linux/unix/bsdのディレクトリ構造のそもそもの信念 ## ワイルドカード証明書の危険性 ## ldap pcapしてみたい. ## なにかに命を吹き込む作業をしてみたい - 人々が幸せになるようなにかを生み出す.便利とかではなく,あたたかくなるものを. - 自分と一番あうのは安直にはロボット的ななにかなのか. ## [Git ある一つのファイルだけ以前のコミット時の状態に戻す | ハックノート](https://hacknote.jp/archives/24692/) - あるブランチから違うブランチにファイルをもってくるときにつかえる - ここでワイルドカードはつかえないみたい ``` % git checkout feature/hoge -- source/hoge/data* ``` ## [sudo コマンドの脆弱性 (CVE-2019-14287) について](https://www.jpcert.or.jp/newsflash/2019101601.html) ## [Homebrewで旧バージョンのパッケージをインストールしたい - Qiita](https://qiita.com/KyoheiG3/items/912bcc27462871487845) ## [git > commit message / signoff > Signed-off-by:を付ける > git commit --signoff - Qiita](https://qiita.com/7of9/items/9e52c63e36a7e865888a#:~:text=SO%20%3E%20What%20is%20the%20Sign,%E3%81%95%E3%82%8C%E3%82%8B%E3%81%A8%E3%81%AE%E3%81%93%E3%81%A8%E3%80%82&text=patch%E3%81%AA%E3%81%A9%E3%81%AB%E9%96%A2%E4%BF%82%E3%81%97,%E3%81%9F%E3%81%84%E6%99%82%E3%81%AB%E4%BD%BF%E3%81%86%E3%82%88%E3%81%86%E3%81%A0%E3%80%82) ## [AI-Aviation HP 航空路管制(管制部)周波数](http://ainet.bent.jp/aviation/airband_acc.html) ## [Homebrewで旧バージョンのパッケージをインストールしたい - Qiita](https://qiita.com/KyoheiG3/items/912bcc27462871487845) ## [GitHub - puppeteer/puppeteer: Headless Chrome Node.js API](https://github.com/puppeteer/puppeteer) ## [Material-UI: A popular React UI framework](https://material-ui.com/) ## [10 Digits Puzzle by 3DP_PARK - Thingiverse](https://t.co/N7tpL0J1cT) ## [What is TianoCore?](https://www.tianocore.org/) ## h2oのmrubyでgithubのwebhookを受ける ``` ################################################################################## # based on MIT lib mruby-hmac by Thiago Scalone. Many Thanks. # https://github.com/scalone/mruby-hmac # # Created on: Aug 25, 2020 # Author: Yudai Hashimoto # Web : https://jp7fkf.dev/ # # MIT License # # Copyright (c) 2018 - 2020 Yudai Hashimoto (JP7FKF), Thiago Scalone # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # ################################################################################# BLOCK_SIZE = 64 OPAD = "\x5c" IPAD = "\x36" PADDING = "\x00" def hexdigest(message, key, digester) return digest(message, key, digester).unpack("H*").first end def digest(message, key, digester) if (key.length > BLOCK_SIZE) key = digester.digest(key) end if (key.length < BLOCK_SIZE) key = key + (PADDING * (BLOCK_SIZE - key.length)) end o_key_pad = xor(OPAD * BLOCK_SIZE, key) i_key_pad = xor(IPAD * BLOCK_SIZE, key) return Digest::SHA1.digest(o_key_pad + Digest::SHA1.digest(i_key_pad + message)) end def xor(a, b) return a.unpack('C*').zip(b.unpack('C*')).map{ |c,d| c ^ d }.pack('C*') end SECRET_KEY = 'xxxxx' lambda do |env| HMAC_DIGEST = Digest::SHA1.new body = env['rack.input'].read hmac_signature = 'sha1=' + hexdigest(body, SECRET_KEY, HMAC_DIGEST) if env["HTTP_X_HUB_SIGNATURE"] == hmac_signature IO.popen('/etc/h2o/misc/gitdeploy.sh') return [200, {'content-type' => 'text/plain'}, ["ok"]] end return [400, {'content-type' => 'text/plain'}, ["HMAC didn't match"]] end ``` - SECRET_KEYはハードコーディングしないほうがいい.envにもつなどしましょう. - [Securing your webhooks - GitHub Docs](https://docs.github.com/en/developers/webhooks-and-events/securing-your-webhooks) - [mruby-hmac/hmac.rb at master · scalone/mruby-hmac · GitHub](https://github.com/scalone/mruby-hmac/blob/master/mrblib/hmac.rb) - [github_webhook.rb · GitHub](https://gist.github.com/jp7fkf/202499856c1460e2caa504c60dd926d4) - [Webサイトをgithubで管理してpush時に自動的に同期する方法 - Blog by Sadayuki Furuhashi](http://frsyuki.hatenablog.com/entry/20110402/p1) ## [kashionki38 blog](https://kashionki38.hatenablog.com/) ## [GitHub - bmachiel/python-nport: Python package for handling n-port data (Touchstone, CITI)](https://github.com/bmachiel/python-nport) ## [「プログラミング言語Go完全入門」の「完全」公開のお知らせ | メルカリエンジニアリング](https://engineering.mercari.com/blog/entry/goforbeginners/) ## sipsコマンドでHEICからjpgに変換する - `find . -name '*.HEIC' | xargs -IT basename T .HEIC | xargs -IT sips --setProperty format jpeg ./T.HEIC --out ./T.jpg;` ## [Netdata](https://www.netdata.cloud/) ## [Cisco IOS ソフトウェア コンフィギュレーション ガイド Cisco IOS Release 15.1SY - Ethernet Virtual Connections(EVC; イーサネット バーチャル コネクション) [Cisco Catalyst 6500 シリーズ スイッチ] - Cisco](https://www.cisco.com/c/ja_jp/td/docs/sw/campuslanswt-coredistribution/cat6500swt/cg/002/15-1-sy-c4-swcg/ethernet-virtual-connection.html) ## [マイクロソフトが「SMB over QUIC」ファイル共有プロトコル実装中。VPNなしでもインターネット上で安全にファイルサーバへのアクセスを実現へ - Publickey](https://www.publickey1.jp/blog/20/smb_over_quicvpn.html) ## [QSOrder Audio Cloud Search](https://qsorder.hamradiomap.com/)