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

77 total results found

BookStack

Code Snippets Web

Get / Post / Delete options works roughly like this: # Import all markdown files into a book find . -name '*.md' -print0 | while IFS= read -r -d '' file; do python bookstack-api.py markdown_inport "$file" done # Trash all pages containing a search query: ...

Docker

Code Snippets Web

Mount a volume as the host user This allows writing to the volume. Dockerfile: COPY .docker/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh", "docker-php-entrypoint", "php-fpm"] entrypoint.sh: #!/usr/bin/env bash echo "C...

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

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

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

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