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
$ stat /path/to/file --print=%y | |
2012-07-17 21:23:33.497181920 +0900 | |
$ stat /path/to/file --print=%y | sed -e 's/\..*//g' | |
2012-07-17 21:23:33 | |
$ stat /path/to/file --print=%y | sed -e 's/\..*//g' | sed -e 's/\ /T/' | |
2012-07-17T21:23:33 | |
$ stat /path/to/file --print=%y | sed -e 's/\ .*//g' |
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
[email protected] | |
[email protected] | |
SUBJECT="subject" | |
MSG=`printf "hoge\nfoo\nbar"` | |
sendmail -t << EOF | |
From: $FROM | |
To: $TO | |
Subject: $SUBJECT |
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
# default path : ~/.aws/config | |
[default] | |
aws_access_key_id=<default access key> | |
aws_secret_access_key=<default secret key> | |
# Optional, to define default region for this profile. | |
region=ap-northeast-1 | |
[profile testing] | |
aws_access_key_id=<testing access key> |
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
ls -l | awk 'NR > 1 { for (i = 10; i < NF; i++) { printf("%s ", $i) } print $NF }' |
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
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html | |
wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip | |
unzip awscli-bundle.zip | |
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/bin/aws |
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
# gem install bundle --no-ri --no-rdoc | |
$ bundle gem capistrano-shell | |
create capistrano-shell/Gemfile | |
create capistrano-shell/Rakefile | |
create capistrano-shell/LICENSE.txt | |
create capistrano-shell/README.md | |
create capistrano-shell/.gitignore | |
create capistrano-shell/capistrano-shell.gemspec | |
create capistrano-shell/lib/capistrano/shell.rb |
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
$ s3cmd --configure | |
Enter new values or accept defaults in brackets with Enter. | |
Refer to user manual for detailed description of all options. | |
Access key and Secret key are your identifiers for Amazon S3 | |
Access Key: Write your Access Key | |
Secret Key: Write your Secret Key | |
Encryption password is used to protect your files from reading |
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
%_topdir %(echo $HOME)/rpmbuild | |
%_smp_mflags -j3 | |
%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot |
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
VERSION=2.8.1 | |
TMP_DIR=/tmp | |
REDIS_DIR=redis-$VERSION | |
REDIS_SRC=$REDIS_DIR.tar.gz | |
RPM_BUILD_DIR=$HOME/rpmbuild | |
RPM_BUILD_SOURCES=$RPM_BUILD_DIR/SOURCES | |
REDIS_SPEC=$RPM_BUILD_DIR/SPECS/redis.spec | |
REDIS_LOGROTATE=$RPM_BUILD_SOURCES/redis.logrotate | |
REDIS_INIT=$RPM_BUILD_SOURCES/redis.init |
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
python -m SimpleHTTPServer 80 |