=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') |
Update: I no longer work for the company and this challenge is no longer used, but I'll leave the gist here in case people want to practice.
Using Ruby on Rails we would like you to create a simple expert search tool. The application should fulfill the requirements below. The source code must be placed in a public repo on GitHub. The application should be deployable on Heroku.
- I enter a name and a personal website address and a member is created.
- When a member is created, all the heading (h1-h3) values are pulled in from the website to that members profile.
- The website url is shortened (e.g. using http://goo.gl)
- After the member has been added, I can define their friendships with other existing members. Friendships are bi-directional i.e. If Sasha is a friend of Ash, Ash is always a friend of Sasha as well.
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
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
- A Russian translation of this article can be found here, contributed by Timur Demin.
- A Turkish translation can be found here, contributed by agyild.
- There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
defimpl Kipatest.Can, for: Kipatest.User do | |
use Kipatest.Web, :model | |
def can?(%User{} = subject, :owner, %User{} = user) do | |
user.id == subject.id | |
end | |
end |
#!/bin/bash | |
USER=${1:-sebble} | |
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-) | |
PAGES=$((658/100+1)) | |
echo You have $STARS starred repositories. | |
echo |