Based on tests on my machine (2013 MacBook Pro, 2.6 GHz i7, 16 GB RAM) generated by https://github.com/pragdave/map_performance
Elixir v1.0.4
Based on tests on my machine (2013 MacBook Pro, 2.6 GHz i7, 16 GB RAM) generated by https://github.com/pragdave/map_performance
Elixir v1.0.4
#! /bin/sh | |
# Enable FileVault | |
if [[ `fdesetup status` != "FileVault is On." ]]; then | |
sudo fdesetup enable | |
fi | |
xcode-select --install | |
echo "###############################################################" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Here are some things I have learned along the way.
Last Updated: 2013-02-08
Original Audience: Hack Reactor
NOTE: I like to prepend some of the commands with
time
just for curiosity’s sake to see how long it takes.
Go to System Preferences -> Sharing -> uncheck the Personal Web sharing. You will never turn Apache on/off here again.
You can break these rules if you can talk your pair into agreeing with you.
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost:8080/_search?q=* | |
# | |
# is rewritten to: | |
# |
require "./config/environment" | |
use Rails::Rack::LogTailer | |
use Rails::Rack::Static | |
run ActionController::Dispatcher.new |
=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') |