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
This file contains hidden or 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 java.io.ByteArrayOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Properties; | |
| import org.apache.avro.io.BinaryDecoder; | |
| import org.apache.avro.io.BinaryEncoder; | |
| import org.apache.avro.io.DecoderFactory; |
This file contains hidden or 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
| ;; | |
| ;; NS CHEATSHEET | |
| ;; | |
| ;; * :require makes functions available with a namespace prefix. | |
| ;; | |
| ;; * :use makes functions available without a namespace prefix | |
| ;; (i.e., refers functions to the current namespace). | |
| ;; | |
| ;; * :import refers Java classes to the current namespace. | |
| ;; |
This file contains hidden or 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
| 1) stopping all running solr processes | |
| 2) removing the solr folder BUT keep a copy of it accessible in case you need some of the old config, synonyms and such. | |
| 3) gem uninstall all related gems | |
| > for i in `gem list --no-versions`; do gem uninstall -aIx $i; done | |
| 4) bundle install | |
| 5) rails generate sunspot_rails:install |
This file contains hidden or 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
| var express = require('express'); | |
| var app = express.createServer(); | |
| require('./settings').boot(app); | |
| app.dynamicHelpers({ | |
| base: function(){ | |
| // return the app's mount-point | |
| // so that urls can adjust. For example | |
| // if you run this example /post/add works |
This file contains hidden or 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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
This file contains hidden or 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 java.io.ByteArrayOutputStream; | |
| import java.io.FileOutputStream; | |
| import java.util.ArrayList; | |
| import java.util.LinkedHashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import com.itextpdf.text.Chapter; | |
| import com.itextpdf.text.Chunk; | |
| import com.itextpdf.text.Document; |
NewerOlder