Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

82 total results found

Flatpak

Code Snippets Shell

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

WordPress Knowledge

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

Git

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

WordPress

Performance Strategy

WordPress Knowledge

CDN for assets Full page cache such as Batcache Fragment caching for menus Longcache for lower traffic sites.

Types of tests

Testing

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

Linux

This has been moved to https://github.com/svandragt/break-aware

Performance

WordPress Knowledge

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...

performance

New Page

WordPress Knowledge

WP-CLI

WordPress Knowledge

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/{}"