most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
<?php if ( 'post_type' == get_post_type() ) : | |
$term_list = get_the_terms( $post->ID, 'custom_taxonomy' ); // get the taxonomy terms | |
if ( count($term_list) > 2 ) { // if there are more than 2 terms, use a comma, e.g.: this, this, that | |
$sep = __( ', ', 'textdomain' ); | |
} elseif ( count($term_list) === 2 ) { // if there are EXACTLY 2 terms, use an "and", e.g.: this and that | |
$sep = __( ' and ', 'textdomain' ); | |
} else { // there there is only one (or no) terms, don't use anything | |
$sep = null; | |
} | |
$sep_num = 1; // we'll use this as a counter later |
// Move Yoast to bottom | |
function yoasttobottom() { | |
return 'low'; | |
} | |
add_filter( 'wpseo_metabox_prio', 'yoasttobottom'); |
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
<?php | |
/* | |
* Set the following constants in wp-config.php. | |
* These should be added somewhere BEFORE the constant ABSPATH is defined. | |
* | |
* Author: Chad Butler | |
* Author URI: https://butlerblog.com | |
* | |
* For more information and instructions, see: https://b.utler.co/Y3 |
//The following section is an add-on to this tutorial - https://tri.be/gravity-forms-events-calendar-submissions/ | |
//Shout to CreativeSlice.com for their initial work | |
/* Before Starting: | |
- Make sure you have these three plugins installed | |
- Gravity Forms | |
- The Events Calendar | |
- Gravity Forms + Custom Post Types | |
- Once Gravity Forms is installed, create a form with these fields | |
- Single Line Text (Event Title) | |
- Paragraph Text (Event Description) |