纯技术小白如何利用Coding Pages搭建免费WordPress站点

著名的学习大神 Scott Young ,他曾提到一个细节:在学习一个东西的时候,你能否用比喻的方式向一个 10 岁的小孩解释清楚?

号称终极快速学习法的「费曼技巧」强调:在你学习某个概念的过程中,如果你可以清楚地和别人解释这个概念,那么你才算是对很好地掌握了这个概念。 ...  阅读全文

如何在Mac中快速批量创建文件夹

当我们在进行剪辑工作的时候,常常会在项目文件夹中分为:脚本、素材、音乐、图片、项目文件等子文件,而当新的项目进来的时候,为了快速的整理和归档,我们仍然会使用这样的结构来归档新的项目,但是如果子文件夹一多,新建、重命名显然不是一个聪明的办法。

把一项工作做好,都是有规律可循的,我们常常把规律也称之为「结构」。我们在工作中常常利用文件夹的形式来呈现最佳工作流,比如在我自己开发课程的过程中,会给一个课程项目划分了如下几个子文件夹:

  • 01_Scripts:课程脚本
  • 02_Slides:课程演示文档
  • 03_ExerciseFiles:课程配套文件
  • 04_Design:设计文件资料
  • 05_Marketing:营销活动资料
  • 06_Operation:教务活动资料

当时当我要研发新的课程的时候,再重新根据这些文档来新建显然是非常浪费时间的,所以我们就需要一个可以根据这个「模版」自动批量新建文件夹的工具:Mac Terminal。

方法一:Mkdir

你可以打开 Mac 的命令行工具 Terminal,然后使用cd到具体的需要创建子文件夹的文件夹里,再执行对应的命令mkdir命令:

cd /Users/aban/Documents/Sites/course
mkdir "01_Scripts" "02_Slides" "03_ExerciseFiles" "04_Design" "05_Marketing" "06_Operation"

这样一来,系统就会自动在Course的文件夹里头创建了5个子文件夹了。

方法二:Mkdir

如果你的文件夹一多,这样手动输入的方式也不是特别的方法。所以我们可以先把对应的「子文件夹名」输入到txt文档中,比如dirlist.txt,然后在保存到具体的需要创建子文件夹的文件夹里:

01_Scripts 02_Slides 03_ExerciseFiles 04_Design 05_Marketing 06_Operation  ...  阅读全文

ChangeLog应该怎么写?

在工作中需要写很多课程文档,随着不断的迭代,内容也会不断的变化,时间一长,就很可能忘记之前在什么时候做过什么改动了,所以这个时候就需要文档的写作者保持更新 Changelog 来确保每一个协作者都在同一个步伐。

很多人认为更新日志好像是只有「写代码」才需要的一个文档,但是只要涉及到文档协同、对1个文档进行长期的迭代,我们都需要一个更新文档来记录历史变动,这样新的人进来就可以对整个来龙去脉有一个非常直观的了解。

什么是更新日志

那什么是更新日志呢?更新日志(Change Log)是一个由人工编辑,以时间为倒叙的列表。 这个列表记录所有版本的重大变动。

我们来看一个直观的案例。


# Change Log All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Added - zh-CN and zh-TW translations from @tianshuo. - de translation from @mpbzh. - it-IT translation from @roalz. - sv translation from @magol. - tr-TR translation from @karalamalar. - fr translation from @zapashcanon. ### Changed - Start versioning based on the current English version at 0.3.0 to help translation authors keep things up-to-date. - Fix typos in zh-CN translation. - Fix typos in pt-BR translation. ## [0.3.0] - 2015-12-03 ### Added - RU translation from @aishek. - pt-BR translation from @tallesl. - es-ES translation from @ZeliosAriex. ## [0.2.0] - 2015-10-06 ### Changed - Remove exclusionary mentions of "open source" since this project can benefit both "open" and "closed" source projects equally. ## [0.1.0] - 2015-10-06 ### Added - Answer "Should you ever rewrite a change log?". ### Changed - Improve argument against commit logs. - Start following [SemVer](http://semver.org) properly. ## [0.0.8] - 2015-02-17 ### Changed - Update year to match in every README example. - Reluctantly stop making fun of Brits only, since most of the world writes dates in a strange way. ### Fixed - Fix typos in recent README changes. - Update outdated unreleased diff link. ## [0.0.7] - 2015-02-16 ### Added - Link, and make it obvious that date format is ISO 8601. ### Changed - Clarified the section on "Is there a standard change log format?". ### Fixed - Fix Markdown links to tag comparison URL with footnote-style links. ## [0.0.6] - 2014-12-12 ### Added - README section on "yanked" releases. ## [0.0.5] - 2014-08-09 ### Added - Markdown links to version tags on release headings. - Unreleased section to gather unreleased changes and encourage note keeping prior to releases. ## [0.0.4] - 2014-08-09 ### Added - Better explanation of the difference between the file ("CHANGELOG") and its function "the change log". ### Changed - Refer to a "change log" instead of a "CHANGELOG" throughout the site to differentiate between the file and the purpose of the file — the logging of changes. ### Removed - Remove empty sections from CHANGELOG, they occupy too much space and create too much noise in the file. People will have to assume that the missing sections were intentionally left out because they contained no notable changes. ## [0.0.3] - 2014-08-09 ### Added - "Why should I care?" section mentioning The Changelog podcast. ## [0.0.2] - 2014-07-10 ### Added - Explanation of the recommended reverse chronological release ordering. ## 0.0.1 - 2014-05-31 ### Added - This CHANGELOG file to hopefully serve as an evolving example of a standardized open source project CHANGELOG. - CNAME file to enable GitHub Pages custom domain - README now contains answers to common questions about CHANGELOGs - Good examples and basic guidelines, including proper date formatting. - Counter-examples: "What makes unicorns cry?" [Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...HEAD [0.3.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.8...v0.1.0 [0.0.8]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.7...v0.0.8 [0.0.7]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.6...v0.0.7 [0.0.6]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.5...v0.0.6 [0.0.5]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.4...v0.0.5 [0.0.4]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.3...v0.0.4 [0.0.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.2...v0.0.3 [0.0.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.1...v0.0.2
 ...  阅读全文

如何理解JS中闭包的概念

Javascript中的闭包是比较难的概念,本文截取部分自JavaScript面向对象编程指南的内容,对闭包的概念进行解释。

在了解闭包之前,首先要熟悉作用域链,因为闭包的出现是为了突破作用域链。

作用域链

如果我们在一个外部函数outer()中嵌套了一个内部函数inner(),那么在inner()中可以访问的变量既来自于它自身的作用域,也可以来自其父级的作用域,这样就形成了一个作用域链。

var global = 1; function outer () { var outer_local = 2; function inner() { var inner_local = 3; ruturn inner_local + outer_local + global; } return inner(); } // 执行 > outer(); > 6  ...  阅读全文

数据挖掘学习图谱

研究生的学习,如果说要挑出两门最意义重大的课,一个是族印的纪录片课,另外一个就是数据挖掘俱乐部。虽然这一年大部分的时间都是自学,但是课程的存在对于一个人的驱动作用还是非常强烈的:你非常清楚自己喜欢什么,但是因为如果没有开课,没有实践,你根本就很难在这一件你喜欢的事情上练出真功夫。 ...  阅读全文