-
Language and Framework
- RVM(1.26.11)
- Ruby(2.1.5): After install rvm, execute
rvm install 2.1.5
in command line should do the trick - Bundler(1.7.6): After install ruby, execute
gem install bundler -v 1.7.6
in command line - Rails(4.1.4): After install ruby, execute
gem install rails -v 4.1.4
in command line
-
Database
-
Web 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
import random | |
import math | |
class Driver(): | |
""" | |
random generate two drivers with start and end coordinates | |
""" | |
def __init__(self): | |
self.start_crd = self.gen_crd() | |
self.end_crd = self.gen_crd() |
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
# config valid only for Capistrano 3.4 | |
lock '3.4.0' | |
set :application, 'my_blog' | |
set :repo_url, 'repo_address' | |
set :deploy_to, '/site_name' | |
set :scm, :git | |
set :branch, "master" |
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
.highlight pre, pre, .highlight .hll { background-color: #2E4F57; border: 2px solid #A2CD5A; padding: 6px 10px; border-radius: 10px; } | |
.highlight .c { color: #BDBDBD } /* Comment */ | |
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */ | |
.highlight .k { color: #66d9ef } /* Keyword */ | |
.highlight .l { color: #ae81ff } /* Literal */ | |
.highlight .n { color: #f8f8f2 } /* Name */ | |
.highlight .o { color: #f92672 } /* Operator */ | |
.highlight .p { color: #f8f8f2 } /* Punctuation */ | |
.highlight .cm { color: #BDBDBD } /* Comment.Multiline */ | |
.highlight .cp { color: #BDBDBD } /* Comment.Preproc */ |
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
{ | |
"auto_indent": true, | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"detect_indentation": true, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"find_selected_text": true, | |
"font_size": 17.0, | |
"highlight_line": true, | |
"indent_to_bracket": true, | |
"tab_size": 2, |
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
In Console: | |
[1] 598 illegal hardware instruction bundle exec rails s | |
In ~/Library/Logs/DiagnosticReports |
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
结果新鲜出炉啦,代码是这样写的: | |
count_time_1 = Time.now | |
count_time_2 = count_time_1 | |
start_time = "2012-12-15 00:00:00".to_time(:local) | |
end_time = "2012-12-25 00:00:00".to_time(:local) | |
p "READY? GO!!!!" | |
#时间对比 |