Skip to content

Instantly share code, notes, and snippets.

gem install mysql2 -- --with-mysql-config=/usr/local/mysql-5.6.16-osx10.7-x86_64/bin/mysql_config
gem uninstall libv8
gem install therubyracer
@frankel
frankel / gist:11040762
Created April 18, 2014 12:10
sublime text 插件
install package:
ApacheConf.tmLanguage
@frankel
frankel / gist:11108825
Last active August 29, 2015 14:00
ubuntu上用 Phantomjs截屏后显示的字体为乱码的问题
apt-get install xfonts-wqy
apt-get install xfonts-intl-chinese
以及字体大全
http://blog.coolaj86.com/articles/how-to-get-more-fonts-on-ubuntu.html
tar -zxvf xxx.tar.gz
安装mysql2 gem遇到的坑:
apt-get install libmysqlclient-dev
@frankel
frankel / gist:43fc658967f12c8e7885
Created November 24, 2014 07:50
Rails console print log
ActiveRecord::Base.logger = Logger.new STDOUT
@frankel
frankel / gist:1a81103dc8c2fb5e1f33
Last active August 29, 2015 14:12
如何正确配置logstash和logstash-forwarder
参考文章:
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
@frankel
frankel / gist:1059820
Created July 2, 2011 07:24
Dual monitor in Ubuntu, run script.
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA-0 "1280x1024_60.00"
xrandr --output VGA-0 --mode 1280x1024_60.00
xrandr --output VGA-0 --left-of DVI-0
@frankel
frankel / gist:1759062
Created February 7, 2012 10:44
Install nokogiri with libxml2 version 2.7.8 in Mac
gem install nokogiri -- --with-xml2-include=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/Users/frankelma/github/homebrew/Cellar/libxslt/1.1.26
gem install nokogiri -- --with-xml2-include=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/include/libxml2
--with-xml2-lib=/Users/frankelma/github/homebrew/Cellar/libxml2/2.7.8/lib
--with-xslt-dir=/Users/frankelma/github/homebrew/Cellar/libxslt/1.1.26