This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# /home/直下のディレクトリをスキャンし、ユーザーごとに最終更新ファイルを表示する(ドットファイルは除く)。 | |
# 該当ファイルがない場合はディレクトリ名(ユーザー名)を表示する。 | |
# | |
TMP_OUTPUT=/tmp/a.txt | |
if [ "$#" -eq 1 ]; then | |
TARGET="$1" | |
fi | |
cd /home |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[email protected] | |
_INITDIR=~/.pgpool-check/init/ | |
_CHECKDIR=~/.pgpool-check/current/ | |
function _die { | |
echo $1 | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
// | |
// pg-persist.php | |
// pgpool ではクライアントからの接続がない場合は障害時でもフェイルオーバー | |
// しないため、DB接続を維持するため(だけ)のスクリプトを準備した。 | |
// cron から起動する場合はバックグラウンド起動とすること。 | |
// テスト側でのみ必要。 | |
// | |
// https://www.php.net/manual/ja/ref.pdo-pgsql.connection.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/7" | |
config.vm.network "private_network", ip: "192.168.56.13" | |
config.vm.network "private_network", ip: "172.16.32.4" | |
config.vm.network "private_network", ip: "172.16.0.7" | |
config.vm.hostname = "db2" | |
config.vm.synced_folder ".", "/vagrant", disabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gradle QuickStart - 7.2. 基本的なJavaプロジェクト | |
// cf. http://gradle.monochromeroad.com/docs/userguide/userguide.html | |
// Gradle が使用する JRE | |
// システムの JDK/JRE。デフォルト以外の JDK を使用したい場合は | |
// JAVA_HOME 環境変数を調整する。 | |
// Gradle が使用する Groovy | |
// Gradle 同梱の Groovy。システムの Groovy は参照されない。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat $1 | \ | |
nkf -Sw -Lu -Z4 -X | \ | |
sed -e '1,5d' | \ | |
head -n -2 | \ | |
sed -e 's/","/\t/g' | |
-e 's/"//g' \ | |
-e 's/フリカエ/振替/g' \ | |
-e 's/コクミンネンキン/国民年金/g' \ | |
-e 's/ホケンリヨウ/保険料/g' \ |
NewerOlder