Skip to content

Instantly share code, notes, and snippets.

View dkjensen's full-sized avatar
🏠
Working from home

David Jensen dkjensen

🏠
Working from home
View GitHub Profile
@rockschtar
rockschtar / windows-wsl2-docker-lando-php-xdebug.md
Last active June 4, 2024 16:38
Windows 10/11 + WSL2 + Docker + Lando + PHP XDebug (PHPStorm, IntelliJ & Visual Studio Code (vscode))
  1. Install WSL
  2. Install your preferred WSL Linux Distro vom Microsoft Store. In my case I used Ubuntu 20.04.
  3. Install Docker for Windows
  4. Enable Docker WSL2 Integration image
  5. Install Lando inside WSL
wget https://github.com/lando/lando/releases/download/v3.6.0/lando-x64-v3.6.0.deb
dpkg -i --ignore-depends=docker-ce lando-x64-v3.6.0.deb
@polevaultweb
polevaultweb / deploy.sh
Last active March 31, 2020 02:51
Deploy script for Travis CI to deploy a WordPress plugin to the repository
#!/usr/bin/env bash
if [[ -z "$TRAVIS" ]]; then
echo "Script is only to be run by Travis CI" 1>&2
exit 1
fi
if [[ -z "$WP_ORG_PASSWORD" ]]; then
echo "WordPress.org password not set" 1>&2
exit 1
@wpsmith
wpsmith / delete-posts.sql
Created February 12, 2014 16:47
SQL: Delete all posts of a custom post type with its associated meta data (taxonomies, post meta)
DELETE a,b,c
FROM {PREFIX}_posts a
LEFT JOIN {PREFIX}_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN {PREFIX}_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'POST_TYPE' AND a.post_date < '2014-01-01'