user script for re:Invent 2025 event portal to improve its calendar by:
- show code, type and venue on the calendar directly
- highlight sessions where isn't a breakout session and you have no reserved seat
Confirmed working with Tampermonkey.
| // ==UserScript== | |
| // @name correct aws what's new article page <title> | |
| // @description correct | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2025-08-07 | |
| // @author sorah.jp | |
| // @match https://aws.amazon.com/about-aws/whats-new/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.com | |
| // @grant none | |
| // ==/UserScript== |
| Security Measure | Description | |
|---|---|---|
| ☐ | Use HTTPS everywhere | Prevents basic eavesdropping and man-in-the-middle attacks |
| ☐ | Input validation and sanitization | Prevents XSS attacks by validating all user inputs |
| ☐ | Don't store sensitive data in the browser | No secrets in localStorage or client-side code |
| ☐ | CSRF protection | Implement anti-CSRF tokens for forms and state-changing requests |
| ☐ | Never expose API keys in frontend | API credentials should always remain server-side |
| <!-- Add this code if you would like accordions on your Category Page --> | |
| <div class="container-divider"></div> | |
| <div class="container"> | |
| <nav class="sub-nav"> | |
| {{breadcrumbs}} | |
| {{search submit=false}} | |
| </nav> | |
Sometimes, a customer might have data being loaded programmatically into a page and want that data to write to form fields. Because HubSpot Forms are generated programmatically with React, there need to be two considerations in your code that make setting fields programmatically more difficult:
These two considerations are handled separately.
There are two methods to handle this - one including jQuery and one using vanilla javascript
| <?php | |
| function change_yoast_seo_og_meta() { | |
| add_filter( 'wpseo_opengraph_desc', 'change_desc' ); | |
| } | |
| function change_desc( $desc ) { | |
| // This article is actually a landing page for an eBook | |
| if( is_singular( 123 ) ) { |
| <?php | |
| /** | |
| * Updates product prices. | |
| * More about WP CLI scripts: | |
| * https://wptheming.com/2021/05/wp-cli-scripts-and-woocommerce/ | |
| * | |
| * wp eval-file update-product-prices.php | |
| */ | |
| $products = get_posts([ |
| More recent resolution: | |
| 1. cd ~/../../etc (go to etc folder in WSL). | |
| 2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line). | |
| 3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line). | |
| 4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian). | |
| 5. cd ~/../../etc (go to etc folder in WSL). | |
| 6. sudo rm -Rf resolv.conf (Delete the resolv.conf file). | |
| 7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and | |
| secondary. |
| <?php | |
| $query = new WP_Query([ | |
| // Standard query args. Using post__in can be much faster. If searching ACF custom | |
| // database tables data, plugin the found post IDs in here. | |
| 'post_type' => 'post', | |
| 'post__in' => [1,2,3], // array of post IDs | |
| // Optional args to improve performance. Use these to cut down on internal |
| <?php | |
| function change_link( $permalink, $post ) { | |
| if( $post->post_type == 'resources_post_type' ) { | |
| $resource_terms = get_the_terms( $post, 'resource_type' ); | |
| $term_slug = ''; | |
| if( ! empty( $resource_terms ) ) { | |
| foreach ( $resource_terms as $term ) { |