1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Reference: https://github.com/adamwiggins/rest-client
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Reference: https://github.com/adamwiggins/rest-client
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Step 1:
Comment out bind-address
on /etc/mysql/my.conf
or change it to your VM ip address.
1
|
|
Step 2: Create a MySQL user with full/part privileges on all database:
1 2 3 4 5 |
|
Step 3: Open your Ubuntu VM, goto Setting->Network->Adapter1 tab->Port Forwarding, add rule: name:mysql protocol:tcp host ip: [blank] host port: 3306 guest ip: [blank] guest port: 3306
click ok
step 4: Connect MySQL in your host machine,
1 2 3 |
|
1 2 3 4 5 6 7 8 9 10 |
|
1 2 3 4 |
|
Octopress failed to read_yaml if your markdown file is GBK encoding. edit Ruby1.9.3\lib\ruby\gems\1.9.1\gems\jekyll-0.11.2\lib\jekyll\convertible.rb as follow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
force_encoding will do the trick.
1 2 3 4 5 6 7 8 9 10 |
|
Windows 7 + ruby 1.9.3p125 (2012-02-16) 先安装 ruby 1.9.3和DevKit 然后git clone octopress octopress目录下有个rakefile rake -T查看可用的task rake new_post[“post title”] 在/source/_post下生成一个markdown文件, 编辑markedown文件为blog内容
rake generate将在_deploy目录下生成静态文件 rake deploy将生成的静态文件push到github上
其中在generate的时候可能由于python的版本问题出错:
当增加如下code block 后,
1
|
|
使用octopress的rake generate生成静态文件时,提示无法打开:
1
|
|
原因是python的版本不对。 下载了一个activepython2.7.2.5后,设置好环境变量就OK了 octopress的语法高亮是gem rubypython调用python的pygments做得
In javascript, function can be attached onto any object; object attributes can be anything,when it is a function, it become a method of that object.
If object is prototype of a function, the attached function becomes instance method of that function(`class’).
In ruby, all methods are reside in instance of Class:
1 2 3 4 5 |
|
1 2 3 4 |
|
1 2 3 4 5 6 7 8 9 10 |
|
1 2 |
|
1 2 3 |
|
1 2 |
|
1 2 3 4 5 6 7 |
|
1 2 3 4 5 6 7 8 9 10 11 |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
|