Skip to content

Instantly share code, notes, and snippets.

View ricksouto's full-sized avatar

Richard Souto ricksouto

View GitHub Profile
@ricksouto
ricksouto / docker-compose.yml
Last active July 15, 2022 13:13
Docker Compose Wordpress Template
version: '3'
services:
# Database
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
@ricksouto
ricksouto / .gitignore
Created September 10, 2021 12:51 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@ricksouto
ricksouto / gist:5b09fa14e5abe61740879df7b8c8284f
Created August 24, 2021 02:04
Delete all Wordpress posts for a given type
DELETE FROM wp_posts WHERE post_type='post_type';
DELETE FROM wp_postmeta WHERE post_id NOT IN (SELECT id FROM wp_posts);
DELETE FROM wp_term_relationships WHERE object_id NOT IN (SELECT id FROM wp_posts)
@ricksouto
ricksouto / estados
Created September 9, 2020 20:27 — forked from michelbrito/estados
Lista de Estados Brasileiros
AC|Acre
AL|Alagoas
AP|Amapá
AM|Amazonas
BA|Bahia
CE|Ceará
DF|Distrito Federal
ES|Espírito Santo
GO|Goiás
MA|Maranhão