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
| RBENV_DIR = "/usr/local/rbenv" | |
| RUBY_VER = "1.9.3-p448" | |
| # install packages | |
| %w{ | |
| gcc | |
| gcc-c++ | |
| openssl-devel | |
| readline | |
| readline-devel |
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
| # mac | |
| http://files.vagrantup.com/packages/b12c7e8814171c1295ef82416ffe51e8a168a244/Vagrant-1.3.1.dmg | |
| # linux | |
| sudo yum localinstall http://files.vagrantup.com/packages/b12c7e8814171c1295ef82416ffe51e8a168a244/vagrant_1.3.1_x86_64.rpm | |
| vagrant box add centos6.3 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.3-x86_64-v20130101.box | |
| mkdir -p ~/vagrant/repos/centos6.3 | |
| cd ~/vagrant/repos/centos6.3 |
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
| if (UnicodeBlock.of(character) == UnicodeBlock.ARABIC) { | |
| // | |
| } |
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 | |
| set -e | |
| URL=${1} | |
| while : ;do | |
| DATE_OUT=`date +"%Y/%m/%d-%k:%M:%S"` | |
| CURL_OUT=`curl -w 'http_code\t%{http_code}\ttotal\t%{time_total}\tconnect\t%{time_connect}\tstarttransfer\t%{time_starttransfer}\n' "${URL}" -s -o /dev/null` | |
| echo -e "${DATE_OUT}\t${CURL_OUT}" |
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
| # root | |
| yum -y install git | |
| yum -y install mercurial | |
| yum -y install ncurses-devel | |
| yum -y install gcc | |
| yum -y install ruby ruby-devel | |
| cd /usr/local/src | |
| hg clone https://vim.googlecode.com/hg/ vim | |
| cd vim |
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/env python | |
| import sys | |
| import os.path | |
| import re | |
| from subprocess import * | |
| LAST_N_REQUESTS = 50000 | |
| LOG_PATH = '/usr/local/apache/logs/access.log' | |
| LOG_OPEN_COMMANDS = [ | |
| ('tail', '-n %d' % LAST_N_REQUESTS, LOG_PATH), |
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
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Map.Entry; | |
| import org.apache.commons.beanutils.PropertyUtils; | |
| /** | |
| * JavaBeanをMapにディープdescribeします。PropertyUtils使って。 |
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
| * add jmagick.jar > Java Build Path Entries | |
| * add jmagick.jar > Deployment Assembly | |
| * jmagick.systemclassloader setting | |
| static { | |
| System.setProperty("jmagick.systemclassloader","false"); | |
| } | |
| or |
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
| # imagemagick | |
| brew install imagemagick --disable-openmp | |
| すると色々怒られるので、 | |
| sudo brew link libtiff | |
| sudo brew link little-cms | |
| sudo brew link jasper | |
| sudo brew link imagemagick | |
| sudo brew link jpeg | |
| する |
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
| class RedisOutput < Fluent::BufferedOutput | |
| # Register plugin first. NAME is the name of this plugin | |
| # which is used in the configuration file. | |
| Fluent::Plugin.register_output('redis_sample', self) | |
| def initialize | |
| require 'msgpack' | |
| require 'redis' | |
| super | |
| end |