看来 jQuery 你已经用得很爽了,想学习如何自己编写插件。非常好,这篇文档正适合你。用插件和方法来扩展 jQuery 非常强大,把最聪明的功能封装到插件中可以为你及团队节省大量开发时间。
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
n = Notification::Answer.new | |
n.class.name.split('::').last || '' | |
# => "Answer" | |
n.class.name.split('::').first || '' | |
# => "Notification" |
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
http { | |
upstream app-pc { | |
server 127.0.0.1:8001; | |
} | |
upstream app-mobile { | |
server 127.0.0.1:8002; | |
} | |
server { |
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
# http://viget.com/extend/rails-engine-testing-with-rspec-capybara-and-factorygirl | |
rails plugin new my_engine --dummy-path=spec/dummy --skip-test-unit --mountable | |
# or, the full monty: | |
rails plugin new active_scraper --mountable --dummy-path=spec/dummy --skip-test-unit --skip-javascript --skip-sprockets --skip-action-view | |
# https://github.com/rspec/rspec-rails | |
rails generate rspec:install |
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
{ | |
"name": "SyncExtension", | |
"version": "0.1", | |
"manifest_version": 2, | |
"description": "Storage Sync Extension", | |
"permissions": [ "storage" ], | |
"browser_action": { |
Mac自带了的JDK6,安装在目录:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
下。
JDK7,JDK8则需要自己到Oracle官网下载安装对应的版本。自己安装的JDK默认路径为:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk
export JAVA_6_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
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
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo: | |
cd /etc/yum.repos.d/ | |
vim nginx.repo | |
填写如下内容: | |
[nginx] | |
name=nginx repo |
OlderNewer