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 ruby | |
# This script installs only to /usr/local on Mac or ~/.linuxbrew on Linux. | |
# To install elsewhere you can just untar | |
# https://github.com/Homebrew/homebrew/tarball/master anywhere you like or | |
# change the value of HOMEBREW_PREFIX. | |
def mac? | |
/darwin/i === RUBY_PLATFORM | |
end |
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
参考文章: | |
https://www.digitalocean.com/community/tutorials/how-to-use-logstash-and-kibana-to-centralize-and-visualize-logs-on-ubuntu-14-04 | |
logstash | |
http://logstash.net/ | |
logstash-forwarder | |
https://github.com/elasticsearch/logstash-forwarder | |
在接收log的服务器上安装logstash,简称ServerA |
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
ActiveRecord::Base.logger = Logger.new 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
安装mysql2 gem遇到的坑: | |
apt-get install libmysqlclient-dev |
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
tar -zxvf xxx.tar.gz |
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
apt-get install xfonts-wqy | |
apt-get install xfonts-intl-chinese | |
以及字体大全 | |
http://blog.coolaj86.com/articles/how-to-get-more-fonts-on-ubuntu.html |
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
install package: | |
ApacheConf.tmLanguage |
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
gem uninstall libv8 | |
gem install therubyracer |
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
gem install mysql2 -- --with-mysql-config=/usr/local/mysql-5.6.16-osx10.7-x86_64/bin/mysql_config |
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
Ruby 1.9 偏好使用新的 lambda 字面语法。 | |
# 差 | |
lambda = lambda { |a, b| a + b } | |
lambda.call(1, 2) | |
# 好 | |
lambda = ->(a, b) { a + b } | |
lambda.(1, 2) |
NewerOlder