Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
To install Postgres (linux): | |
1. Open your terminal and type sudo apt-get install postgresql | |
2. After installing postgres, you might like to install pgAdmin III. It is a nice GUI to have, especially for beginners. To do this, in terminal type ```sudo apt-get install pgadmin3 | |
3. To start off, we need to change the PostgreSQL postgres user password; we will not be able to access the server otherwise. As the “postgres” Linux user, we will execute the psql command. In terminal, type sudo -u postgres psql postgres | |
4. Set a password for the "postgres" database role using the command: \password postgres | |
and give your password when prompted. The password text will be hidden from the console for security purposes. | |
Type Control+D to exit the posgreSQL prompt. |
=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') |
namespace :figaro do | |
desc "SCP transfer figaro configuration to the shared folder" | |
task :setup do | |
on roles(:app) do | |
upload! "config/application.yml", "#{shared_path}/application.yml", via: :scp | |
end | |
end | |
desc "Symlink application.yml to the release path" | |
task :symlink do |
class ApplicationController < ActionController::Base | |
# stuff | |
private | |
# These groups are equivalent: | |
# | |
# render action: :new, locals: { item: x } | |
# render :new, locals: { item: x } |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |