I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.
I read the spec, some blog posts, and looked through some code. I learned how to
socat Examples | |
=============== | |
* 注意 | |
- SYSTEM で : を使う時は必ずエスケープすること | |
* 相手に接続 | |
# telnet, netcat, socat それぞれの場合 | |
$ socat - TCP:127.0.0.1:8000 |
I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.
I read the spec, some blog posts, and looked through some code. I learned how to
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
インスタンスの起動スクリプトとかを書いてるときによく欲しいと思うやつです。
例えば、 service nginx start
が実行されたあとに curl -i localhost | grep "200 OK"
とかをすると、サービスがそれなりに動いていることが確認できてよかったりするのですが、あまりにも直後だとサーバの起動が間に合わず、curl が失敗してしまいます。nginxだとまだましだけど、アプリケーションサーバだとそれなりに時間がかかったりする。
古典的な解決方法は、 sleep 30
です。簡単だけど、アプリケーションが巨大になってくると30秒では起動しないこともある。じゃぁ sleep 60
が妥当か?でも、サーバインスタンスの起動スクリプト全体はできるだけ早く立ち上がってほしい。困った。
なので、curlが成功するまで叩き続ける、みたいなスクリプトに仕上げたくなるわけです。
# 例1 | |
"書き込み内容" ` | |
| % { [Text.Encoding]::UTF8.GetBytes($_) } ` | |
| Set-Content -Path ".\BOMlessUTF8.txt" -Encoding Byte | |
# 例2 | |
Get-Content -Path ".\Source.txt" -Raw -Encoding Default ` | |
| % { [Text.Encoding]::UTF8.GetBytes($_) } ` | |
| Set-Content -Path ".\BOMlessUTF8.txt" -Encoding Byte |
This short document will show how to turn systemd-nspawn into a usable containeration system.
Those instructions here should work under Arch Linux and Debian 10 (Buster)