This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com | |
| # See https://www.byte.nl/blog/magento-cacheleak-issue | |
| user app; | |
| worker_processes 4; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 768; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Bundler Integration | |
| require "bundler/capistrano" | |
| # Application Settings | |
| set :application, "yourapplicationname" | |
| set :user, "serveruser" | |
| set :deploy_to, "/home/#{user}/rails-applications/#{application}" | |
| set :rails_env, "production" | |
| set :use_sudo, false | |
| set :keep_releases, 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This can be found in the Symfony\Component\HttpFoundation\Response class | |
| const HTTP_CONTINUE = 100; | |
| const HTTP_SWITCHING_PROTOCOLS = 101; | |
| const HTTP_PROCESSING = 102; // RFC2518 | |
| const HTTP_OK = 200; | |
| const HTTP_CREATED = 201; | |
| const HTTP_ACCEPTED = 202; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Copyright (c) 2007, Roger Veciana | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * | |
| * Redistributions of source code must retain the above copyright notice, this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set-option -g default-command "reattach-to-user-namespace -l zsh" | |
| set -g default-terminal "xterm-256color" | |
| # change the prefix from 'C-b' to 'C-a' | |
| # (remap capslock to CTRL for easy access) | |
| unbind C-b | |
| set -g prefix C-a | |
| bind C-a send-prefix |