Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am foxzool on github.
* I am foxzool (https://keybase.io/foxzool) on keybase.
* I have a public key ASAkw3BwISffC5U6iDLC1Wor6P6luBHTkvdQsCkw50ByhQo
To claim this, I am signing this object:
@foxzool
foxzool / .gitignore
Created February 11, 2011 07:46
rails git ignore template
.DS_Store
.bundle
.project
.idea
nbproject
config/database.yml
log/*
tmp/*
db/*.sqlite3
db/schema.rb
@foxzool
foxzool / model.zh-CN.yml
Created January 17, 2011 03:25
template model zh-CN i18n
zh-CN:
activerecord:
models:
user: '用户'
attributes:
user:
email: '邮箱'
password: '密码'
password_confirmation: '确认密码'
@foxzool
foxzool / simple_form.zh-CN.yml
Created January 17, 2011 03:21
simple_form zh-CN i18n
zh-CN:
simple_form:
"yes": '是'
"no": '否'
required:
text: '需要'
mark: '*'
# You can uncomment the line below if you need to overwrite the whole required html.
# When using html, text and mark won't be used.
# html: '<abbr title="required">*</abbr>'
@foxzool
foxzool / responders.zh-CN.yml
Created January 17, 2011 03:02
responders i18n zh-CN
zh-CN:
flash:
actions:
create:
notice: '%{resource_name} 成功创建.'
update:
notice: '%{resource_name} 成功更新.'
destroy:
notice: '%{resource_name} 成功删除.'
alert: '%{resource_name} 不能删除.'
@foxzool
foxzool / devise.zh-CN.yml
Created January 17, 2011 02:31
devise zh-CN
zh-CN:
errors:
messages:
not_found: "没有找到"
already_confirmed: "已经确认"
not_locked: "没有锁定"
not_saved:
one: "有 1 个错误发生导致「%{resource}」无法被保存。"
other: "有 %{count} 个错误发生导致「%{resource}」无法被保存。"
@foxzool
foxzool / rails3template.rb
Created January 13, 2011 10:24
my rails3 template
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?
class AppBuilder < Rails::AppBuilder
include Thor::Actions
include Thor::Shell
def test
append_test_gems
rspec
cucumber
jasmine
end
@foxzool
foxzool / zh-CN.yml
Created December 5, 2010 05:29
typus zh-CN i18n
# zh-CN translations for Typus (template)
# by ZoOL <http://github.com/zhooul>
zh-CN:
"A valid token is required": "需要验证令牌"
"Actions": "动作"
"Active": "已激活"
"Add": "新增"
"Add %{resource}": "新增 %{resource}"
"Add new": "新增"
@foxzool
foxzool / gist:728752
Created December 5, 2010 03:50
my nginx configure of worldpress
location ~/(.*)/wp-admin/$ {
index index.php;
rewrite ^/(.*)/wp-admin/$ /wp-admin/ break;
}
location ~ /(.*)/wp-([a-zA-Z])*\.php {
index index.php;
rewrite ^/(.*)/(.*\.php) /$2 last;
}
location ~ /(.*)/(wp-(?:admin|content|includes).*\.php) {
root /var/www/html/wordpress/;