Skip to content

Instantly share code, notes, and snippets.

View iwai's full-sized avatar

Yuji Iwai iwai

View GitHub Profile
@iwai
iwai / scl_enable.sh
Last active June 20, 2016 04:36
CentOS Permanently Enable a Software Collection
# for /etc/profile.d/scl_enable.sh
for f in `ls /opt/rh/*/enable`;
do
source $f
done
@iwai
iwai / dstat-darkgray2white.patch
Created January 23, 2015 05:33
for dstat-0.7.0-1.5.amzn1.noarch
--- dstat.back 2015-01-23 14:23:26.911928403 +0900
+++ dstat 2015-01-23 14:24:21.237011050 +0900
@@ -1608,11 +1608,11 @@
'error': ansi['white'] + ansi['redbg'],
'roundtrip': ansi['darkblue'],
'debug': ansi['darkred'],
- 'input': ansi['darkgray'],
+ 'input': ansi['white'],
'text_lo': ansi['gray'],
- 'text_hi': ansi['darkgray'],
* Using Amazon RDS Event Notification http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html
* http://rfs.jp/server/aws/aws-rds_slow-query.html
* http://dev.classmethod.jp/cloud/aws/rds-monitoring-replication-state/
@iwai
iwai / mon-put-instance-data.pl.fluentd-monitor.patch
Created March 11, 2014 02:14
Added fluentd metrics for CloudWatchMonitoringScripts v1.1.0
--- mon-put-instance-data.pl.orig 2014-03-09 20:42:45.106610966 +0900
+++ mon-put-instance-data.pl 2014-03-09 23:26:34.075877884 +0900
@@ -31,6 +31,7 @@
--disk-space-util Reports disk space utilization in percentages.
--disk-space-used Reports allocated disk space in gigabytes.
--disk-space-avail Reports available disk space in gigabytes.
+ --fluentd=HOST:PORT Reports output buffer_queue_length, buffer_total_queued_size, retry_count.
--aggregated[=only] Adds aggregated metrics for instance type, AMI id, and overall.
--auto-scaling[=only] Adds aggregated metrics for Auto Scaling group.

Growl notify off and bonjour turn off.

$ defaults write ch.sudo.cyberduck growl.enable false
$ defaults write ch.sudo.cyberduck rendezvous.enable false
sudo rpm -ivh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
sudo yum-config-manager --disable rpmforge

Gitのレポジトリ単位でユーザを切り替える

~/.gitconfig のグローバル設定とは別のユーザでcommitとかしたい場合

$ cat .git/config
[user]
        name = Yuji Iwai
 email = your@mailaddress