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 repeatIE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.
Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.
As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.
| <?php | |
| /** | |
| * NOTE: This gist is very old. You might want to check out recent forks | |
| * like this one: https://github.com/Alexlytle/Wordpress_custom_route/blob/main/Wordpress_Custom_route.php | |
| * (thanks @Alexlytle) If you have an improvement to this gist, please | |
| * post a link in a comment for others who might benefit. Thanks! | |
| * | |
| * A class to create simple custom routes. | |
| * |
| #!/bin/sh | |
| echo Install all AppStore Apps at first! | |
| # no solution to automate AppStore installs | |
| read -p "Press any key to continue... " -n1 -s | |
| echo '\n' | |
| echo Install and Set San Francisco as System Font | |
| ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
| echo Install Homebrew, Postgres, wget and cask | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
| // XPath CheatSheet | |
| // To test XPath in your Chrome Debugger: $x('/html/body') | |
| // http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
| // 0. XPath Examples. | |
| // More: http://xpath.alephzarro.com/content/cheatsheet.html | |
| '//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
| <?php | |
| /** | |
| * Create a new custom yoast seo sitemap | |
| */ | |
| add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' ); | |
| add_action( 'init', 'init_wpseo_do_sitemap_actions' ); | |
| // Add custom index |
| function drink(Promise, friend, pints){ | |
| var count = 0; | |
| var promises = pints.map(function(pint){ | |
| return friend | |
| .drink() | |
| .then(increaseCount) | |
| .catch(reject); | |
| }); |
| <?php | |
| if (!function_exists('html_build_attributes')) { | |
| /** | |
| * Generate a string of HTML attributes | |
| * | |
| * @param array $attr Associative array of attribute names and values. | |
| * @param callable|null $callback Callback function to escape values for HTML attributes. | |
| * Defaults to `htmlspecialchars()`. | |
| * @return string Returns a string of HTML attributes. |
| { | |
| "lastfm": { | |
| "username": "ericboehs", | |
| "password": "secret", | |
| "api_key": "abc123", | |
| "api_secret": "xyz890" | |
| } | |
| } |