Skip to content

Instantly share code, notes, and snippets.

@a-oishi
a-oishi / dropbox.repo
Last active June 26, 2016 02:44
Yumリポジトリ
[dropbox]
name=Dropbox Repository
baseurl=http://linux.dropbox.com/fedora/\$releasever/
gpgkey=http://linux.dropbox.com/fedora/rpm-public-key.asc
enabled=1
@a-oishi
a-oishi / gist:4b533652052e529fc318
Created November 19, 2015 10:52
[Wildfly][mod_cluster]Advertiseのマルチキャスト送信用のルーティング設定
□ # cp -pi /etc/sysconfig/network-scripts/route-eth0 /backup/dir
□ # vi /etc/sysconfig/network-scripts/route-eth0
ファイル末尾に下記を追加
----------------------
224.0.1.105/32 dev eth0
----------------------
□ # diff /etc/sysconfig/network-scripts/route-eth0 /backup/dir
--------------
@a-oishi
a-oishi / update_crm_attribute
Last active November 8, 2015 17:10
[Heartbeat][Pacemaker]update_crm_attribute
function update_crm_attribute() {
local NAME=$1
local NEW_VALUE=$2
local CMD="/usr/sbin/crm_attribute"
local NODE=`uname -n`
local OLD_VALUE=`timeout -s 2 2 ${CMD} --type nodes --node "${NODE}" --name "${NAME}" --query -q`
if [ $? -eq 0 ]; then
if [ "${OLD_VALUE}" != "${NEW_VALUE}" ]; then
timeout -s 2 2 ${CMD} --type nodes --node "${NODE}" --name "${NAME}" --update "${NEW_VALUE}"
## プロジェクト毎に認証鍵を管理することができるらしい
http://komeda-shinji.blogspot.jp/2015/02/rundeck_6.html
@a-oishi
a-oishi / gist:c9a34654526cd8c39f13
Created July 26, 2015 10:09
[Linux] MBRを削除して、簡単にPXEブートできるようにする方法
dd if=/dev/zero of=ディスク・デバイス bs=512 count=1
@a-oishi
a-oishi / gist:4455f0bf480d9be400b9
Last active August 29, 2015 14:24
[Windows] Poderosa設定

download

install

setup

  • log : save log automatically with timestamp
  • font : ricty 9pt
  • backgroupd : dark-gray
  • connection list: 5(default) to 100
  1. ツール > 詳細プリファレンスエディタ
  2. org.poderosa.usability.mru.limitCount: 5 -> 100
@a-oishi
a-oishi / gist:7d97010c65613fb9a660
Last active August 29, 2015 14:24
[PostgreSQL] psqlでログインできるようになるまで
$ sudo yum install postgresql-server
$ sudo /etc/init.d/postgresql initdb
$ sudo /etc/init.d/postgresql start
$ sudo chkconfig postgresql on
# vi /var/lib/pgsql/data/pg_hba.conf
--
host all all 127.0.0.1/32 trust
--
@a-oishi
a-oishi / gist:0d485f209f0191dec554
Created July 3, 2015 11:38
[PostgreSQL] チートシート
## ユーザ一覧
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+-------------+-----------
postgres | Superuser | {}
: Create role
: Create DB
test | Superuser | {}
: Create role
@a-oishi
a-oishi / gist:8cba7c7d3a5f227da0fd
Created June 12, 2015 10:15
[HP-UX] CPU数確認方法
$ /usr/contrib/bin/machinfo
@a-oishi
a-oishi / gist:d08fbbe10c37aa6c1800
Created March 18, 2015 12:48
[Windows][git Bash][.bash_profile][conemu]
alias ls='ls --show-control-chars'
alias ll='ls -al'
alias rm='rm -i'
alias mv='mv -i'
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash
fi
if [ -f ~/.git-prompt.sh ]; then