Skip to content

Instantly share code, notes, and snippets.

View qichunren's full-sized avatar
🌈
Focusing contribute

Qichunren qichunren

🌈
Focusing contribute
View GitHub Profile
#
sudo su
# 使用下面的命令启动 XAMPP:
/Applications/XAMPP/xamppfiles/xampp start
# in Gemfile
gem 'factory_girl_rails', "1.0.0"
# gem 'shoulda-matchers'
gem 'remarkable_activerecord', '>=4.0.0.alpha4'
# in spec/support/remarkable.rb
require 'remarkable/active_record'
# in a rspec test
if ActiveRecord::Base.connection.adapter_name != "Mysql2"
             /Users/qichunren/.rvm/gems/ruby-1.9.2-p0/gems/rcov-0.9.9/lib/rcov/file_statistics.rb:115:in `block in is_code?': invalid byte sequence in US-ASCII (ArgumentError)

rcov 0.9.8

rake spec:rcov not work

How to fix it?

in file

@qichunren
qichunren / install_git.md
Created February 15, 2011 02:15
How to install git on centos
@qichunren
qichunren / syn_repos.md
Created February 15, 2011 02:13
update code with official repos

Update a Github Fork from the Original Repo

Here

   git remote add --track master mleung git://github.com/mleung/feather.git

   git remote

   git fetch mleung
@qichunren
qichunren / script.sh
Created February 15, 2011 02:11
with different port
scp -P 8705 demo.git.tar.gz [email protected]:/home/git/repos
git clone ssh://[email protected]:8705/home/git/repos/demo.git
require "thor/shell"
say("Modifying a new Rails app ...", :yellow)
#----------------------------------------------------------------------------
# Configure
#----------------------------------------------------------------------------
=begin
unless options[:database] == 'sqlite3'
username = ask("What's your database username[root]")
username = 'root' if username.blank?
@qichunren
qichunren / hh
Created September 24, 2010 07:53
jj
#!/usr/bin/env ruby
# 批量替换 指定目录及其子目录中所有文件内的字符串
class File
class << self
def gsub!(s,t,dir=Dir.pwd)
Dir.entries(dir).each do |f|