- Project (Drupal) is served on
/var/www/html
in the Vagrant box - Local project files location:
c:\Users\username\Work\projects\my-project\repo\html
- Guest machine IP is 10.0.2.2 (if this doesn't work, run
route -nee
in the VM and look for the gateway address)
It's hard to migrate section themes that rely heavily on images. This bit of code helps you download all the CDN assets of your theme.
- Create a
cdn_assets
folder - Create the
download_assets.js
file at the root of your project - Edit the
download_assets.js
file to match the path to your settings_data.json (line 3) - Edit the
download_assets.js
file to set the "CDN code" of your store. Each file that you upload from/admin/settings/files
gets uploaded with the following format:https://cdn.shopify.com/s/files/1/YOUR_CDN_CODE/files/YOURFILE
. The format of the code is/\d{4}\/\d{4}/
(four digits, a forward slash, and four digits)
I freaking love working with technologies like Gulp, and wanted to share how to get my current Craft front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, ExpressionEngine, etc).
- project root/
- craft/
- templates/
- craft/
- (your craft template files)
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 file live inside of your ~/.wp-cli | |
# ------------------------------------------------------------------- | |
# path: cms # this is the path to your WordPress files | |
core install: | |
admin_user: <YOUR ADMIN USERNAME> | |
admin_password: <YOUR ADMIN PASSWORD> | |
admin_email: <YOUR ADMIN EMAIL> | |
title: The Next Big Deal in WordPress Sites |
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 | |
// Database configuration. | |
$databases = array(); | |
$databases['default']['default'] = array( | |
'driver' => 'mysql', | |
'host' => 'mysql', | |
'username' => 'mysql', | |
'password' => 'mysql', | |
'database' => 'data', |
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
#!/bin/bash | |
# --------------------------------------------------------- | |
# Customizable Settings | |
# --------------------------------------------------------- | |
MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/casesafe}" | |
VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.casesafe.dmg.sparseimage}" | |
VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-casesafe}" | |
VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-60g}" |
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 | |
// PHP memory limit for this site | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
// Database | |
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
// Explicitely setting url |
Inspired mostly from the Bootstrap DS215j blog post
# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optware
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
[user] | |
name = Paulo Avila | |
#email = | |
[alias] | |
br = branch | |
co = checkout | |
ci = commit -a | |
feature = checkout -b | |
amend = commit --amend #--no-edit |
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 | |
if( IS_DEV_SITE ) { | |
//Disable RSS Feeds functions | |
add_action('do_feed', array( $this, 'disabler_kill_rss' ), 1); | |
add_action('do_feed_rdf', array( $this, 'disabler_kill_rss' ), 1); | |
add_action('do_feed_rss', array( $this, 'disabler_kill_rss' ), 1); | |
add_action('do_feed_rss2', array( $this, 'disabler_kill_rss' ), 1); | |
add_action('do_feed_atom', array( $this, 'disabler_kill_rss' ), 1); | |
if(function_exists('disabler_kill_rss')) { |