This file contains 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
{%- comment -%} | |
Instructions: | |
- Create a blank page called 'Google Base Product Feed'and save it | |
- Open that page for editing and select 'page.google-feed' from the page template selector | |
- Add a brief site description to the meta-shop-description snippet | |
- The feed url should now be available at http://www.yoursite.com/pages/google-base-product-feed | |
- validate your field at http://validator.w3.org/feed/ | |
- when ready, submit your feed at http://base.google.com |
This file contains 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
# /etc/apache2/sites-available/000-default.conf | |
########################################## | |
########################################## | |
## ## | |
## General Server Setup ## | |
## ## | |
########################################## | |
########################################## |
This file contains 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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
This file contains 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
#!/usr/bin/env ruby | |
# REF => https://gist.github.com/karmi/442106#file-post-receive-deploy-rb-L21 | |
################################################### | |
# === CONFIGURE THE SCRIPT HERE ================= # | |
deploy_branch = 'master' #=> change to production | |
git_path = Dir.pwd | |
application_path = File.dirname(git_path) + "/current" |
This file contains 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
# /etc/nginx/sites-enabled/default | |
########################################## | |
########################################## | |
## General Server Setup ## | |
########################################## | |
########################################## |
This file contains 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 file contains 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
# /etc/nginx/sites-enabled/default | |
########################################## | |
########################################## | |
## General Server Setup ## | |
########################################## | |
########################################## |
This file contains 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
# => Exceptions App | |
# => Sends to routes (notice how it does not persist the request) | |
# => config/application.rb | |
config.exceptions_app = self.routes | |
# => Routes | |
# => Sends to the appropriate view | |
# => config/rtoutes.rb | |
%w( 404 422 500 ).each do |code| | |
get code, controller: :application, action: :show, code: code |
This file contains 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/application.rb | |
# This can be put in any of the "environment" files - config/application.rb is just the main | |
config.exceptions_app = ->(env) { ApplicationController.action(:exception).call(env) } | |
# If you want custom exceptions, you need to add new rescue_responses: | |
# http://guides.rubyonrails.org/configuring.html#configuring-action-dispatch | |
config.action_dispatch.rescue_response["Your::Exception"] = :bad_request |
This file contains 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 using the ghostscript processor | |
class Content < ActiveRecord::Base | |
has_attached_file :resource, | |
:styles => { :preview => ["725x1200>", :jpg], :thumb => ["100x140>", :jpg] }, | |
:processors => [:ghostscript, :thumbnail], | |
:convert_options => { :all => '-colorspace RGB -flatten -density 300 -quality 100' }, | |
:path => ":page_path/:class/:id/:resource_token/:style/:filename" | |
end |
NewerOlder