sudo usermod -a -G nginx ec2-user &&
exit
cd ~ && | |
sudo curl -sS https://getcomposer.org/installer | sudo php && | |
sudo mv composer.phar /usr/local/bin/composer && | |
sudo ln -s /usr/local/bin/composer /usr/bin/composer |
$(function() { | |
var host = location.host; | |
var path = location.pathname; | |
var url = '//' + host + path; | |
var target = 'nav a'; | |
$(target).each(function() { | |
var $this = $(this); | |
console.log(url); | |
if($this.attr('href') == url) { | |
$this.addClass('active'); |
add_filter('upload_dir', 'set_upload_folder', 999); | |
function set_upload_folder( $upload_data ) { | |
// absolute dir path, must be writable by wordpress | |
$upload_data['basedir'] = trailingslashit(ABSPATH). '/wp-content/uploads'; | |
$upload_data['baseurl'] = 'http://example.com/wp-content/uploads'; | |
$subdir = $upload_data['subdir']; | |
$upload_data['path'] = $upload_data['basedir'] . $subdir; | |
$upload_data['url'] = $upload_data['baseurl'] . $subdir; | |
return wp_parse_args($upload_data, $upload_data); |
aws rds describe-db-parameter-groups \ | |
--db-parameter-group-name group_name | |
aws rds describe-db-parameters --db-parameter-group-name group_name | |
aws rds modify-db-parameter-group \ | |
--db-parameter-group-name group_name \ | |
--parameters "ParameterName=character_set_server, ParameterValue=utf8mb4, ApplyMethod=pending-reboot" \ | |
--parameters "ParameterName=collation_server, ParameterValue=utf8mb4_general_ci, ApplyMethod=pending-reboot" \ | |
--parameters "ParameterName=tmp_table_size, ParameterValue={DBInstanceClassMemory/16}, ApplyMethod=pending-reboot" \ |
hostname, *aliases = wordpress_sites.flat_map { |(_name, site)| site['site_hosts'] } | |
config.vm.hostname = hostname | |
www_aliases = ["www.#{hostname}"] + aliases.map { |host| "www.#{host}" } | |
if Vagrant.has_plugin? 'vagrant-hostsupdater' | |
config.hostsupdater.aliases = aliases + www_aliases | |
else | |
fail_with_message "vagrant-hostsupdater missing, please install the plugin with this command:\nvagrant plugin install vagrant-hostsupdater" | |
end |
# -*- mode: ruby -*- | |
# # vi: set ft=ruby : | |
require "yaml" | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Box | |
config.vm.box = "ubuntu/trusty64" |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.require_version '>= 1.5.1' | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'roots/bedrock' | |
# Required for NFS to work, pick any local IP | |
config.vm.network :private_network, ip: '192.168.50.5' |
<div class="container"> | |
<?php single_cat_title(); ?> | |
<?php | |
$currentCat = single_cat_title( '', false ); | |
$args = array( | |
'post_type' => 'post', | |
'posts_per_page' => -1, | |
'orderby' => 'date', |
// Add mailto: email links within .main | |
$(".main").filter(function() { | |
var html = $(this).html(); | |
var emailPattern = /[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/; | |
var matched_str = $(this).html().match(emailPattern); | |
if (matched_str) { | |
$(this).html(html.replace(emailPattern, "<a href='mailto:" + matched_str + "'>" + matched_str + "</a>")); | |
return $(this); | |
} | |
}); |