Skip to content

Instantly share code, notes, and snippets.

@douglascabral
douglascabral / functions.php
Last active August 17, 2016 15:19
Clean wp_head
//
// Limpa wp_head().
//
function wp_head_cleanup () {
// Remove Discovery.
remove_action('wp_head', 'rsd_link');
// Remove Feed.
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'feed_links_extra', 3);
@douglascabral
douglascabral / qtranslate_cleanup.sql
Last active April 29, 2016 19:35 — forked from frnhr/qtranslate_cleanup.sql
clean database after qTranslate uninstall
# QTRANSLATE CLEANUP QUERIES
# create temp column to separate post content on <!--more--> tag to simplify queries
ALTER TABLE `wp_posts` ADD `tmp_excerpt` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
# split content
## fill `tmp_exceprt` column
UPDATE wp_posts SET tmp_excerpt =
@douglascabral
douglascabral / mongodb-ubuntu-15.10
Created April 18, 2016 12:11
How to install MongoDB in Ubuntu 15.10
#In terminal execute
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install mongodb-org
#Create /lib/systemd/system/mongodb.service with contents:
[Unit]
Description=High-performance, schema-free document-oriented database