Skip to content

Instantly share code, notes, and snippets.

View qichunren's full-sized avatar
🌈
Focusing contribute

Qichunren qichunren

🌈
Focusing contribute
View GitHub Profile
@qichunren
qichunren / new.html.erb
Created February 28, 2011 07:15
使用bbcode编辑器
<%= content_for :html_head do %>
<%= javascript_include_tag "jquery.bbcode.js" %>
<%= javascript_tag do %>
$(function(){
$("#web_message_content").bbcode({tag_bold:true,tag_italic:true,tag_underline:true,tag_link:true,tag_image:true,button_image:true,image_url:'/images/bbcode/'});
$("#bbcode_preview_btn").bind("click", function(){
var bbcode = $("#web_message_content").val();
$.get("/utils/parse_bbcode", {id:bbcode}, function(text){
#
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