phpdbg 簡易マニュアル
- phpdbg は CLI 環境で使える php 用のデバッガ。C における gdb 的なものです。
- インストール等についてはこちら をごらんください。
#!/usr/bin/php | |
<?php | |
// | |
// pg-persist.php | |
// pgpool ではクライアントからの接続がない場合は障害時でもフェイルオーバー | |
// しないため、DB接続を維持するため(だけ)のスクリプトを準備した。 | |
// cron から起動する場合はバックグラウンド起動とすること。 | |
// テスト側でのみ必要。 | |
// | |
// https://www.php.net/manual/ja/ref.pdo-pgsql.connection.php |
# Enable git-bash-prompt | |
if [ ! -d $HOME/bash-git-prompt ]; then | |
git clone https://github.com/magicmonty/bash-git-prompt.git | |
fi | |
if [ -f "$HOME/bash-git-prompt/gitprompt.sh" ]; then | |
GIT_PROMPT_ONLY_IN_REPO=1 | |
source $HOME/bash-git-prompt/gitprompt.sh | |
fi |
# Tune resolver settings to prevent from yum slow down (for use in Japan) | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo nmcli con mod "System eth0" ipv4.ignore-auto-dns Yes ipv4.dns 8.8.8.8 | |
sudo systemctl restart NetworkManager | |
echo "include_only=.jp" | sudo tee -a /etc/yum/pluginconf.d/fastestmirror.conf | |
SHELL |
#!/bin/bash | |
# | |
# display last login date for each users | |
# | |
for user in vagrant dirsrv dummy ; do | |
if ! id $user >& /dev/null ; then | |
echo -e "$user\tno such user" | |
continue | |
fi | |
LINE="$(LANG=C lastlog -u $user | tail -1)" |
#!/bin/bash | |
# | |
# /home/直下のディレクトリをスキャンし、ユーザーごとに最終更新ファイルを表示する(ドットファイルは除く)。 | |
# 該当ファイルがない場合はディレクトリ名(ユーザー名)を表示する。 | |
# | |
TMP_OUTPUT=/tmp/a.txt | |
if [ "$#" -eq 1 ]; then | |
TARGET="$1" | |
fi | |
cd /home |
#!/bin/bash | |
# Gather dotfiles of specified users. | |
ARC=/tmp/dotfiles.tar | |
USERS=(user1 user2 user3) | |
sudo sh -c "tar cf $ARC /home/etl/.??*" || exit 1 | |
for u in ${USERS[@]} ; do | |
echo $u | |
sudo sh -c "tar rf $ARC /home/$u/.??*" || exit 1 | |
done | |
sudo gzip $ARC |