![aptコマンドで簡単インストール ~「.NET 6」が「Ubuntu 22.04」で利用可能に/極小サイズのDockerイメージも提供](https://cdn-ak-scissors.b.st-hatena.com/image/square/43b5364ccb2cfe28bdab7490b29aa18dc3d44f9f/height=288;version=1;width=512/https%3A%2F%2Fforest.watch.impress.co.jp%2Fimg%2Fwf%2Flist%2F1432%2F664%2Fdotnet.jpg)
シェル (bash) の配列について使い方をまとめてみました。 配列を生成する 配列を生成する場合は配列名=(値1 値2 値3)と記述します。値を指定しなかった場合は空の配列が作成されます。 $ arr=() # 空の配列 $ arr=("first" "second" "third") $ echo "${arr[@]}" first second third declare -a 配列名コマンドを使うことで明示的に宣言することもできます。 $ declare -a arr=("first" "second" "third") $ echo "${arr[@]}" first second third 配列名[インデックス]=値という記法が使われた場合も配列が生成されます。 $ arr[0]="first" $ arr[1]="second" $ arr[2]="third" $ ech
PowerShellでは、HostName や IP Address を取得するのにいくつかやり方が考えられます。 今回、PSRemoting中に取得するに当たって、どの方法が最も実行速度が速いのかを測ってみたので公開します。 検証環境 以下を 同一Zoneの Public VPCからPrivate VPC x2 に向けて10回実行した結果で、単一インスタンスに対して最も遅かった時間(ms)を取得しています。 (初回のDNS解決はICMPで処理済み) PS Remoting 接続元サーバー (Public VPC) Amazon AWS EC2 インスタンス (m1.large) with Windows Server 2012 PS Remoting 接続先サーバー x 2 (Private VPC) Amazon AWS EC2 インスタンス (m1.medium) with Wind
Main メソッドは、C# アプリケーションのエントリ ポイントです (ライブラリおよびサービスでは、エントリ ポイントとしての Main メソッドは必要ありません)。アプリケーションを起動すると、最初に Main メソッドが呼び出されます。 C# プログラムのエントリ ポイントは 1 つのみです。 Main メソッドを持つクラスが 2 つ以上ある場合、プログラムをコンパイルする際に StartupObject コンパイラ オプションを使用して、どの Main メソッドをエントリ ポイントとして使用するかを指定する必要があります。 詳細については、「StartupObject (C# コンパイラ オプション)」を参照してください。 class TestClass { static void Main(string[] args) { // Display the number of com
注意! こちらの記事は自分の解釈を多く含みます。 十分に注意し、念のため検証してから情報を利用してください! この記事の内容と対象 この記事では、以下の内容に触れます。攻撃原理をわかった範囲でまとめるので、なにかのお役に立てば幸いです。 Spring4Shellの脆弱性の全体像 なぜJDK9.0以上のみ限定なの? なぜtomcatで影響は受けているの?ほかは? 脆弱性の概要 SpringShell RCE vulnerability: Guidance for protecting against and detecting CVE-2022-22965 によると 以下の条件を満たしているときに 任意コード実行 につながると書かれています。 Running JDK 9.0 or later Spring Framework versions 5.3.0 to 5.3.17, 5.2.0 t
Created May 12, 2020 21:45 - Updated December 16, 2020 20:54 Note: If you haven't set a User PIN or an Admin PIN for OpenPGP, the default values are 123456 and 12345678, respectively. If the User PIN and/or Admin PIN have been changed and are not known, the OpenPGP Applet can be reset by following this article. These instructions will show you how to set up your YubiKey with OpenPGP. Before you be
16 ADRCI: ADRコマンド・インタプリタ 自動診断リポジトリ・コマンド・インタプリタ(ADRCI)ユーティリティは、Oracle Database診断データの管理に使用するコマンドライン・ツールです。 この章の内容は、次のとおりです。 ADRコマンド・インタプリタ(ADRCI)ユーティリティ 定義 ADRCIの起動とヘルプの利用 ADRCIコマンドを使用する前のADRCIホームパスの設定 アラート・ログの表示 トレース・ファイルの検索 インシデントの表示 インシデントのパッケージ化 ADRCIコマンド・リファレンス ADRCIのトラブルシューティング ADRコマンド・インタプリタ(ADRCI)ユーティリティ ADRCIは、Oracle Database 11gに導入された故障診断機能インフラストラクチャに使用されるコマンドライン・ツールです。ADRCIでは、次の操作を実行できます。
docker-composeとは、複数のコンテナで構成されるサービスを提供する手順を自動的し管理を簡単にするツール。composeファイルを使用しコマンド1回で設定した全サービスを作成・起動することが可能です。
argparse — Parser for command-line options, arguments and sub-commands¶ Source code: Lib/argparse.py The argparse module makes it easy to write user-friendly command-line interfaces. The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv. The argparse module also automatically generates help and usage messages. The module will also issue err
Argparse Tutorial¶ author: Tshepang Mbambo This tutorial is intended to be a gentle introduction to argparse, the recommended command-line parsing module in the Python standard library. Note There are two other modules that fulfill the same task, namely getopt (an equivalent for getopt() from the C language) and the deprecated optparse. Note also that argparse is based on optparse, and therefore v
ShellSpec is a full-featured BDD unit testing framework for dash, bash, ksh, zsh and all POSIX shells that provides first-class features such as code coverage, mocking, parameterized test, parallel execution and more. It was developed as a dev/test tool for cross-platform shell scripts and shell script libraries. ShellSpec is a new modern testing framework released in 2019, but it's already stable
まず対応方法から、DHCPでのDNSサーバ設定を無効にして、新たなDNSサーバを設定するのみです。※NetworkManager の再起動を忘れずに! nmcli con mod enp0s3 ipv4.ignore-auto-dns yes nmcli con mod enp0s3 ipv4.dns 8.8.8.8 systemctl restart NetworkManager nmcli コマンドで DNSサーバを削除できない! CentOS をインストールした場合、デフォルトのネットワーク設定では、DHCPを参照するようになっています。 この場合、インターフェースを有効にしたタイミングで、DHCPから取得した DNSサーバのIPアドレスが /etc/resolv.conf に設定されます。
Basically I need to run the script with paths related to the shell script file location, how can I change the current directory to the same directory as where the script file resides?
思いっきり雑学レベルの話ですみませんが、思い出した今書かないと忘れそうだなと思ったのでw この手法で何が出来るかと言うと、シェルスクリプトを実行するとスクリプトファイルの後ろ(exit で終了されて実行されない領域)に結合されたバイナリ形式の圧縮ファイル部分を抜き出して /tmp 以下に展開してそこに含まれているバイナリ形式の実行ファイルを実行して、一見シェルスクリプトのように見えるのに実はバイナリファイルを実行してるじゃんなどという楽しいことができます。いかにもハックまがいの手法に見えますが、どうやらこの手法は POSIX で考慮されているようです。 これを知ったのは「シバン shebang がないシェルスクリプトはどのシェルで動くかわからない(からちゃんと書いとけ)」の記事を書いている時に見つけた fish の PR 7802 です。fish はシバンがないスクリプトを実行するとエラー
Needs Expansion This article is incomplete, and needs to be expanded. More info... Introduction One of the things which makes GNU/Linux a great operating system is that virtually anything and everything happening on and to the system may be logged in some manner. This information is invaluable for using the system in an informed manner, and should be one of the first resources you use to trouble-s
Summary Introduce a common logging system for all components of the JVM. Goals Common command-line options for all logging Log messages are categorized using tags (e.g. compiler, gc, classload, metaspace, svc, jfr, ...). One message can have multiple tags (tag-set) Logging is performed at different levels: error, warning, info, debug, trace, develop. Possible to select what messages that are logge
ripgrepが圧倒的に速い。こんなに速い理由は大きく2つ。 ripgrepは、検索する必要がなさそうなファイル(たとえば、隠しファイル、バイナリファイル)をデフォルトで無視するようになっている。上記計測に使ったディレクトリを確認したところ、20万ファイル中14万ファイルは無視されるものだった。つまり、ripgrepは実質20万-14万=6万ファイルだけを検索していたのに対し、従来のgrepでは全20万ファイルを律儀に検索していたことになる。 ripgrepは、シンプルに検索のアルゴリズムが優れている。隠しファイル等を無視せず検索するオプションを指定し、検索対象となるファイル数を同じ20万に揃えて計測してみたところ、それでもripgrepは22秒で検索が終わった。 もっと厳密なベンチマークは公式を参照のこと。 https://blog.burntsushi.net/ripgrep/ デフォ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く