Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheelWordPress install is a custom install
| # Kinsta Deployment through Github Actions for Bedrock/Sage. | |
| # | |
| # Placed at: .github/workflow/deploy.yml | |
| # | |
| # Process should be studied from code, but some quick brief: | |
| # - runs composer / sage installation | |
| # - moves correct `.env.*` file for multiple configs | |
| # - uses rsync to sync files, uses /.rsyncignore file to exclude whatever should not be there | |
| # - symlinks uploads folder and symlink release folder to kinsta public hostname | |
| # - if you want to clear cache, please uncomment the last job |
| //Self-Signed Certificate for using with VS Code Live Server | |
| //Save both files in a location you will remember | |
| 1. create a private key | |
| openssl genrsa -aes256 -out localhost.key 2048 | |
| // you will be prompted to provide a password | |
| //this will create localhost.key (call it whatever you like) | |
| 2. create the certificate |
| const convertImages = (query, callback) => { | |
| const images = document.querySelectorAll(query); | |
| images.forEach(image => { | |
| fetch(image.src) | |
| .then(res => res.text()) | |
| .then(data => { | |
| const parser = new DOMParser(); | |
| const svg = parser.parseFromString(data, 'image/svg+xml').querySelector('svg'); |
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
Local by FlyWheel WordPress install is a custom install| <template> | |
| <div> | |
| <input type="file" multiple accept="image/jpeg" @change="detectFiles($event.target.files)"> | |
| <div class="progress-bar" :style="{ width: progressUpload + '%'}">{{ progressUpload }}%</div> | |
| </div> | |
| </template> | |
| <script> |
| After install zsh | |
| - brew update | |
| - brew install nvm | |
| - mkdir ~/.nvm | |
| after in your ~/.zshrc or in .bash_profile if your use bash shell: | |
| export NVM_DIR=~/.nvm | |
| source $(brew --prefix nvm)/nvm.sh |
| <?php | |
| $file = '/path/to/file.png'; | |
| $filename = basename($file); | |
| $upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
| if (!$upload_file['error']) { | |
| $wp_filetype = wp_check_filetype($filename, null ); | |
| $attachment = array( | |
| 'post_mime_type' => $wp_filetype['type'], | |
| 'post_parent' => $parent_post_id, |
| // Move Yoast to bottom | |
| function yoasttobottom() { | |
| return 'low'; | |
| } | |
| add_filter( 'wpseo_metabox_prio', 'yoasttobottom'); |
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |