This file contains 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/env perl | |
=pod | |
Fetches slow query logs from slow_log table of Amazon RDS. | |
Things to change in this script for your own setup: | |
<root_user> to your rds root user (e.g. "root") | |
<root_pass> to your rds root password (e.g. "password") | |
<host_domain> to your rds host domain (e.g. "hoge.ap-northeast-1.rds.amazonaws.com") |
This file contains 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/env perl | |
=pod | |
purge unnecessary logs from MongoDB | |
=cut | |
use strict; | |
use warnings; | |
use MongoDB; |
This file contains 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
# Max line width is 78 cols | |
-l=78 | |
# Indent level is 4 cols | |
-i=4 | |
# Continuation indent is 4 cols | |
-ci=4 | |
# Output to STDOUT |
This file contains 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/sh | |
PROJECT_NAME=$1 | |
if [ $# -ne 1 ]; then | |
echo "usage: install-rails.sh [RAILS_PROJECT_NAME]" 1>&2 | |
exit 1 | |
fi | |
cat << EOS > Gemfile |
This file contains 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
chomp(my $user = `/usr/bin/whoami`); | |
unless ($user eq 'root') { | |
print "cannot exec by $user user.\nyou can execute this script by root only.\n"; | |
exit; | |
} |
This file contains 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/sh | |
# Install Homebrew | |
ruby -e "$(curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
brew install \ | |
lv \ | |
git \ | |
tig \ |
This file contains 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/sh | |
chsh -s /bin/zsh | |
# setup my dotfiles & oh-my-zsh | |
git clone git://github.com/takus/dotfiles.git ~/.dotfiles | |
~/.dotfiles/install/install.sh | |
# Install Vim Plugins with vundle | |
~/.dotfiles/install/vim-bundle.sh |
This file contains 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/sh | |
## Description: | |
## install script of s3fs | |
## | |
## Usage: | |
## install-s3fs.sh [mountpoint] [bucketName] [accessKeyId] [secretAccessKey] | |
MOUNT_POINT=$1 | |
BUCKET_NAME=$2 |
This file contains 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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
binmode STDOUT, ":utf8"; | |
use Config::Pit; | |
use Redmine::API; | |
use Encode; |
This file contains 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/zsh | |
MYSQL_VERSION=5.1.65 | |
if [ `which perl` = "/usr/bin/perl" ]; then | |
echo -n -e "\e[1;31mUSING SYSTEM PERL OK? [y/n]\e[m: " | |
read ANSWER | |
if [ "$ANSWER" != "y" ]; then | |
exit 255 | |
fi |