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 is a basic VCL configuration file for varnish. See the vcl(7) | |
# man page for details on VCL syntax and semantics. | |
# | |
# Default backend definition. Set this to point to your content | |
# server. | |
# | |
# | |
# BACKEND | |
backend default { | |
.host = "127.0.0.1"; |
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
namespace :db do | |
desc "Pull (dump) the remote database and replace the local database with it" | |
task :pull do | |
on roles(:app) do | |
within release_path do | |
with path: "#{fetch(:path)}:$PATH" do | |
execute :mysqldump, "-u #{fetch(:wpdb)[fetch(:stage)][:user]} -p\"#{fetch(:wpdb)[fetch(:stage)][:password]}\" -h #{fetch(:wpdb)[fetch(:stage)][:host]} #{fetch(:wpdb)[fetch(:stage)][:name]} > #{fetch(:tmp_dir)}/database.sql" | |
download! "#{fetch(:tmp_dir)}/database.sql", "database.sql" | |
execute :rm, "#{fetch(:tmp_dir)}/database.sql" | |
end |
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
<?php | |
/** | |
* A replacement for the default wp_trim_excerpt(). | |
* | |
* Generates an excerpt from the_content, if needed. | |
* | |
* It is similar (identical) to the default to allow filters other than our own to work, | |
* with the exception that it uses our default my_trim_words() function. | |
* |
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
<?php | |
/** | |
* Fix media directory location to be outside of wordpress root | |
*/ | |
if ( empty( $upload_path ) || 'wp-content/uploads' == $upload_path ) { | |
update_option( 'upload_path', untrailingslashit( str_replace( 'wp', 'media', ABSPATH ) ) ); | |
update_option( 'upload_url_path', home_url( 'media' ) ); | |
} |
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
<?php | |
/** | |
* Add custom styles to the styleselect dropdown | |
* | |
* @since required+ Foundation 0.5.0 | |
* | |
* @param array $settings | |
* @return array | |
*/ |
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
# Additional SASS Script functions | |
require 'sass' | |
require 'base64' | |
module Sass::Script::Functions | |
def base64encode(string) | |
assert_type string, :String | |
file = "."+string.value | |
data = File.open(file, "rb") {|io| io.read} | |
data = [data].flatten.pack("m").gsub("\n","") |
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
if(!Modernizr.svg){ | |
$("img.svg").each(function(){ | |
var src = this.src.replace('.svg', '.png'); | |
this.src = src; | |
}); | |
} |
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
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
NewerOlder