Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
| # Em resposta a | |
| # http://blog.concretesolutions.com.br/2011/12/testinho-numero-2/ | |
| ### Dados (na ordem: Marguerita, 4 queijos, escarola, portuguesa, frango+catupiry, napolitana) | |
| renato <- list(nome='renato', notas=c(4, 5, 4, 5, 4, 3)) | |
| marcelo <- list(nome='marcelo', notas=c(2, 2, 1, 3, 5, 2)) | |
| lenon <- list(nome='lenon', notas=c(4, 5, 2, 1, 1, 3)) | |
| renata <- list(nome='renata', notas=c(4, 5, 1, 1, 3, 4)) | |
| washington <- list(nome='washington', notas=c(1, 1, 2, 3, 4, 3)) | |
| tino <- list(nome='tino', notas=c(1, 5, 1, 4, 3, 2)) |
| =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') |
| Factory.define :item do |f| | |
| include ActionDispatch::TestProcess | |
| f.name "Macbook Pro 15" | |
| f.price_in_dollars 1500 | |
| f.photo fixture_file_upload('/files/avatar.jpg', 'image/jpg') | |
| end |
| # Index | |
| --------------------------------------------------------------------- | |
| curl -XPUT http://localhost:9200/pictures/ -d ' | |
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "index_analyzer": { | |
| "tokenizer": "standard", |
| 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; |
| =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') |
| 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 |
| 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 |
| ;; | |
| ;; 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. | |
| ;; |