Skip to content

Instantly share code, notes, and snippets.

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()
@alikewmk
alikewmk / deploy.rb
Created August 8, 2015 04:17
Capistrano deploy config for Jekyll
# 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"
@alikewmk
alikewmk / deploy.md
Last active August 29, 2015 14:26
Deploy
  • 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

.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 */
{
"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,
In Console:
[1] 598 illegal hardware instruction bundle exec rails s
In ~/Library/Logs/DiagnosticReports
结果新鲜出炉啦,代码是这样写的:
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!!!!"
#时间对比