Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
=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') |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler' | |
require 'fileutils' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
TMP_DIR = "/tmp/gems" |
class ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
# Add the following to /etc/hosts: | |
127.0.0.1 local.s3.endpoint local-bucket.local.s3.endpoint | |
# Run the following in your rails console, in order to create a bucket: | |
s3=AWS::S3.new( | |
:access_key_id => 'anything', | |
:secret_access_key => 'anything', | |
:s3_endpoint => 'local.s3.endpoint', | |
:s3_port => 4567, | |
:use_ssl => false |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
require 'uri' | |
require 'net/http' | |
class RedirectResolver | |
def self.resolve(uri) | |
uri_input = uri | |
if uri.is_a? String | |
uri = URI.parse(uri) | |
end |
Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.
My 3 developers team has just developed React.js application with 7668
lines of CSS (and just 2 !important
).
During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.
Here are main principles we use to write CSS for modern (IE11+) browsers: