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
| layout proc {|controller| controller.request.xhr? ? "ajax": "application" } |
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
| config.exceptions_app = self.routes |
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
| def show | |
| @show = Show.find(params[:id]) | |
| if stale?(:etag => @show, :last_modified => @show.updated_at.utc) | |
| respond_to do |format| | |
| format.html # index.html.erb | |
| format.json { render json: @show } | |
| end | |
| end | |
| end |
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
| if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ]; then | |
| source "$rvm_path/scripts/rvm" | |
| rvm use `cat .ruby-version` | |
| fi |
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
| // Подгрузка страниц при скроллинге | |
| var thisWork = 1; | |
| function getNextP() { | |
| if( !$('div').is('#products') ) | |
| return false; | |
| if(thisWork == 1) { | |
| nextPageNum = $("#products").data('page') + 1; | |
| if(nextPageNum>$("#products").data('pages')) |
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
| wget repos.1c-bitrix.ru/yum/bitrix-env.sh | |
| chmod +x bitrix-env.sh | |
| ./bitrix-env.sh | |
| Email settings: | |
| http://dev.1c-bitrix.ru/learning/course/?COURSE_ID=48&LESSON_ID=2946&LESSON_PATH=3918.4635.4739.4796.2946 |
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
| load 'deploy' | |
| # Uncomment if you are using Rails' asset pipeline | |
| load 'deploy/assets' | |
| load 'config/deploy' # remove this line to skip loading any of the default tasks |
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 up heroku app | |
| heroku git:remote -a app_name | |
| # Create db backup | |
| heroku pgbackups:capture | |
| # Download last db backup | |
| curl -o latest.dump `heroku pgbackups:url` | |
| # Restore local base from Heroku |
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
| For Apache, use the Location directive into your virtual host(be sure you have included expires and headers modules) | |
| <LocationMatch "^/assets/.*$"> | |
| Header unset ETag | |
| FileETag None | |
| ExpiresActive On | |
| ExpiresDefault "access plus 30 days" | |
| </LocationMatch> | |
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
| ru: | |
| activerecord: | |
| theme/posts: | |
| text: Содержание # theme[posts][text] |