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
| Alternative 1 | |
| ---------------- | |
| /** | |
| * Prevent duplicate image uploads based on file name. | |
| */ | |
| function prevent_duplicate_image_upload( $file ) { | |
| // Only act on image uploads | |
| if ( strpos( $file['type'], 'image/' ) !== 0 ) { | |
| return $file; |
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
| import difflib | |
| from markdown import markdown | |
| from bs4 import BeautifulSoup | |
| # File paths (replace with your actual paths) | |
| A_path = 'document_A.txt' | |
| B_path = 'document_B.txt' | |
| C_path = 'document_C.txt' | |
| output_path = 'document_D.txt' |
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
| /** | |
| * Retrieves the translation of text. | |
| * | |
| * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/ | |
| */ | |
| import { __ } from '@wordpress/i18n'; | |
| /** | |
| * React hook that is used to mark the block wrapper element. | |
| * It provides all the necessary props like the class name. |
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
| { attributes.disableTitle && ( | |
| <ToggleControl | |
| label="Whaterver control here" | |
| onChange={ () => { | |
| setAttributes( { disableImage: !attributes.disableImage } ); | |
| } } | |
| checked={ attributes.disableImage } | |
| /> |
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
| function get_breadcrumb() { | |
| echo '<a href="'.home_url().'" rel="nofollow">Home</a>'; | |
| if (is_category() || is_single()) { | |
| echo " | "; | |
| the_category(' •'); | |
| if (is_single()) { | |
| echo " | "; | |
| the_title(); | |
| } | |
| } elseif (is_page()) { |
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
| source ~/.nvm/nvm.sh | |
| nvm install v16.0.0 | |
| /plugins/gripblocks-medialog$ npm start | |
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
| --change "Users:gm:Downloads: to "Users:Jan:Desktop" or similar | |
| tell application "REAPER" to activate | |
| tell application "System Events" to tell process "REAPER" | |
| tell menu bar item "File" of menu bar 1 | |
| click | |
| delay 1 | |
| tell menu item "Project templates" of menu 1 | |
| click |
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
| tell application "REAPER" to activate | |
| tell application "System Events" to tell process "REAPER" | |
| tell menu bar item "File" of menu bar 1 | |
| click | |
| delay 1 | |
| tell menu item "Project templates" of menu 1 | |
| click |
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
| At home in this town, we often find | |
| The time to goof off and unwind | |
| But today is different, a brand new day | |
| So may we start, and make our way | |
| The radio hums, Edith Piaf's voice | |
| Reminds us to make the right choice | |
| To work hard, and do what we must | |
| And leave behind our playful lust |
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
| tell application "Audacity" | |
| activate | |
| tell application "System Events" | |
| keystroke "n" using {command down} | |
| tell application "System Events" | |
| --click "audio" | |
| keystroke "i" using {command down, shift down} | |
| delay 3 |
NewerOlder