Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.
CS183: Startup—Notes Essay—The Challenge of the Future
Purpose and Preamble
| module Jekyll | |
| class PostPublisher < Generator | |
| safe false | |
| def replace(filepath, regexp, *args, &block) | |
| content = File.read(filepath).gsub(regexp, *args, &block) | |
| File.open(filepath, 'wb') { |file| file.write(content) } | |
| end | |
| def generate(site) |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.
CS183: Startup—Notes Essay—The Challenge of the Future
Purpose and Preamble
| #!/bin/sh | |
| # http://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommited-changes | |
| require_clean_work_tree () { | |
| # Update the index | |
| git update-index -q --ignore-submodules --refresh | |
| err=0 | |
| # Disallow unstaged changes in the working tree | |
| if ! git diff-files --quiet --ignore-submodules --; then |