Skip to content

Instantly share code, notes, and snippets.

View priscillamc's full-sized avatar

Priscilla Chapman priscillamc

View GitHub Profile
View ithemes-banned-users-apache-fix.md

iThemes Security Banned Users Apache Fix

Enables custom IP and Basic Auth restrictions with iThemes Banned Users module enabled.

The 'Require all granted' directive gives access to any host not banned in the list, ignoring any other restrictions in the .htaccess file. This results in basic authentication and other rules not working.

@priscillamc
priscillamc / Git.md
Last active February 6, 2021 20:17
Helpful git commands
View Git.md

Git Commands

Merging branches

Merge specific files from another branch into current branch

git checkout branchname filename filename

git checkout branchname dir1/ dir2/
@priscillamc
priscillamc / wp-theme-checklist.md
Last active June 29, 2017 13:01
Theme update checklist
View wp-theme-checklist.md

Code

-[ ] Removed debugging code (error_log, console.log, var_dump, dbgx_trace_var)

View vim.md

Convert line endings

Convert to Unix: :set ff=unix Convert to Windows: :set ff=dos

Save and close

:wq

Edit file

i

@priscillamc
priscillamc / bs-config.json
Created March 17, 2017 16:41
Open Angular project in Chrome instead of default browser.
View bs-config.json
{
"browser" : "chrome"
}
View development.md
View config.rb
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "."
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
# To enable sourcemap output, set this to true
View svg-css.md

SVG Notes

To create the CSS from a Photoshop template file:

  • For any non-shape layers (including text layers), make a copy. Right-click the copied layer and click 'Convert to Shape'
  • The converted Department Name shape layer should be renamed to "Unit Text"
  • If a shape should have a default color, set the color.
  • Rename layers if needed. The layer name becomes the path id in the svg.
  • Hide layers that don't need to be exported as paths.
  • Select the layers that should be exported. (Bar, Logo, Parent Unit Text, Unit Text)
View wp-add-menus.md

Add menus to a WordPress Theme

In functions.php, register menus:

function theme_setup() {
    register_nav_menus( array(
		'main_menu' => esc_html__( 'Main Menu', 'theme' ),
	) );
}
View wp-cli.md

WP-CLI Commands