Windows10のフォルダー内のグループ表示を解除する

Windows10のエクスプローラーでフォルダを表示すると、下記の画像では、「日付」ごとにファイル・フォルダがグループ分けされて表示されています。
このように「日付」・「拡張子」・「名前」等で各ファイル・フォルダがグループ ...
PowerShellを管理者権限で起動する

コマンドプロンプトを起動して、以下のコマンドで、PowerShellを管理者権限で実行できます
@powershell -NoProfile -ExecutionPo ...コマンドプロンプトで管理者権限のコマンドプロンプトに切り替える

コマンドプロンプトを使っていて管理者権限で使用したい時に、「powershell start-process cmd -verb runas」と入力すると、管理者権限で ...
ヒアドキュメントでHTML分を出力する [PHP]

phpでHTML分を出力する場合、ヒアドキュメントを使うと便利です。
下記が簡単なサンプルです
PHP ログをファイルに出力する

エラーログなどを任意のファイルに等に出力する場合は「error_log」関数を使用すると便利です。error_log関数は任意のメッセージをログファイルに出力したり、メール送信できます
ディスクのUUID確認(blkidコマンド)

CentOS 6以降、fstabでパーティションをマウントポジションなど設定する時にUUIDが設定するようになっています。OSをインストール時に自動でUUIDは設定されるので普段は意識しなくても大丈夫ですが、ディスクを増設したとき ...
PHPの配列の初期化

array関数を使用して、PHPの配列を初期化します。使い方は簡単は、$array = array() のように使います
$array = array();簡単なサンプルでは、配列に値を挿入 ...
muninにPHP-FPMのグラフを増やす

php-fpmで使用しているメモリ、子プロセス数などを視覚的にわかるようにmuninにphp-fpmをグラフを追加します。php-fpmのメモリ、子プロセスを表示するのが目的ですので、php-f ...
nginxに変更したらメモリ不足なったので、php-fpmを設定を見直し

VPSをサーバーをLightsailに変更した際に、Apacheを使っていたWEBサーバーをnginxに変更しました。始めは問題なく動作していたのですが、しばらくするとNe ...
CentOSで、swapのswapの使用率を表示する

Linuxで物理メモリを使い切るとswap領域を使用します。今のメモリ状況は「free」コマンドで確認できます。
下記では、「-m」のオプションでメモリの量をMB単位で表示しています。
Lenovo ideaPad C340 のファンクションキーの設定を変更

最近買った、Lenovo ideaPad C340 のファンクションキーで「F2キー」を押すと音量が小さくなります。私はファイル名を変更したいので「F2キー」を押したのに、メーカーが設定したホットキーの設定になっています。 ...
Windowsで作成したシェルスクリプトで実行すると、「command not found」エラー

シェルスクリプトを作るときはAtom等のエディタで作ってSCPでアップしていました。macOSからWindowsに変更して ...
コマンドランチャー「 Wox 」のインストール及び設定

macOSを使っていたときは、アプリの起動は「Spotlight」を利用して起動していました。使い方はSpotlight の検索窓に起動したいアプリ名を入力すると対象の「フォルダ」「ファイル」 ...
phpで複数のファイルをZIPに圧縮してダウンロードする方法

PHPで複数のファイルをZIP圧縮して、ダウンロードする必要があったのでその際に参考に方法を紹介します
PHPのZIP拡張モジュールがインストールされているか確認するPHP でZIP圧縮する場合は、Zip拡張モジュール ...
phpでExcelファイル(xlsx)のダウンロード

PHPでExcelファイルをダウンロードするコードを調べてみましがが、xlsファイルのダウンロードのサンプルで動作するのはあったのですが、Excel2007以降の「xlsx」ファイルだとネットであるサンプルコードでは動作しないのが ...