Advanced Search
Search Results
82 total results found
Flatpak
Flatpak Runner Example: fr handbrake #!/usr/bin/env bash # Quickly run flatpak installed cli apps by going a grep insensitive search. # Example: `fr handbrake --help` would run `flatpak run fr.handbrake.HandBrakeCLI --help` FLATPAK_ID=$(flatpak list --app | gr...
Importing and Migrations
Using the WordPress Importer plugin Imported posts have their guid set to the source url, but imported media (wp media import) attachment posts do not. This can be fixed as follows: Code snippet: WordPress Import
Per Repo hooks
This is a little helper script that enables version controlled hooks, and per project hooks: Examples are: .hooks/pre-push # version controlled repo hook .hooks/pre-push.local # overrides the previous hook .hooks.local/pre-push # will be run af...
New Page
Performance Strategy
CDN for assets Full page cache such as Batcache Fragment caching for menus Longcache for lower traffic sites.
Types of tests
Unit Tests: Test individual code components in isolation. Functional Tests: Validate overall functionality of modules or systems. Acceptance Tests: Verify software meets stakeholder requirements for deployment.
Time Since Last Resume
This has been moved to https://github.com/svandragt/break-aware
Performance
When migrating content, suspend cache invalidation and flush the cache afterwards. With that in mind, the following optimisation reduces the number of database queries to 1: - $post_data = [ - 'ID' => $post_id, - 'post_content' => $content, - ]; - - $up...
New Page
WP-CLI
To download all attachment files from a remote site: from your local uploads directory: wp post list --post_type=attachment --field=_wp_attached_file | xargs -I {} wget -x -nH --cut-dirs=2 "https://$DOMAIN/wp-content/uploads/{}"