Skip to content

Instantly share code, notes, and snippets.

/* start new bbpress */
.bbp-topic-voice-count {
display: none;
}
.bbp-topic-reply-count {
color: #aaa;
font-size: 80%;
margin-right: 20px !important;
width: inherit !important;
@adamesss
adamesss / woocommerce-optimize-scripts.php
Created May 1, 2018 11:31 — forked from DevinWalker/woocommerce-optimize-scripts.php
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@adamesss
adamesss / disable_tracker.sh
Created March 21, 2018 22:00 — forked from DanyHenriquez/disable_tracker.sh
Disable tracker Ubuntu 16.04
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-extract.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-apps.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-fs.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-user-guides.desktop
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-store.desktop
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false
tracker reset --hard
@adamesss
adamesss / install-ispconfig3-ubuntu.sh
Created February 16, 2018 23:03
Install ISPConfig3 Ubuntu 16.04 64Bits
#!/bin/bash
## Install ISPConfig3 on Ubuntu 16.04 64Bits
## Author: Nilton OS www.linuxpro.com.br
## https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/
## Version 0.6
## Set lang en_US UTF8
## echo 'LC_ALL="en_US.utf8"' >>/etc/environment
@adamesss
adamesss / CreateWordpressUser.php
Created March 24, 2017 13:30 — forked from jawinn/CreateWordpressUser.php
Create WordPress Admin User from PHP
<?php
// ADD NEW ADMIN USER TO WORDPRESS
// ----------------------------------
// Put this file in your Wordpress root directory and run it from your browser.
// Delete it when you're done.
require_once('wp-blog-header.php');
require_once('wp-includes/registration.php');
// ----------------------------------------------------
@adamesss
adamesss / meta-tags.md
Created February 4, 2017 20:27 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@adamesss
adamesss / disable_zlib.output_compression
Created January 17, 2017 12:24 — forked from loorlab/disable_zlib.output_compression
Disable zlib.output_compression on WordPress : Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /path/wp-includes/functions.php on line 3282 via https://core.trac.wordpress.org/ticket/18525
SOLUTIONS I have came across so far:
======================== SOLUTION 1 ====================
In plugins (or somewhere) you probably have this code:
ini_set('zlib.output_compression', '1');
so, I replaced that code with
@adamesss
adamesss / antitheft.php
Created August 29, 2016 01:27 — forked from manastungare/antitheft.php
Laptop Theft Protector
<?php
/*
-------------------------------------------------------------------------------
Laptop Theft Protector
Version 1.0
Copyright (c) 2006, Manas Tungare
http://manas.tungare.name/
-------------------------------------------------------------------------------
READ THIS CAFEFULLY: YOU MUST CUSTOMIZE ONE VARIABLE BEFORE USE.
-------------------------------------------------------------------------------
@adamesss
adamesss / README.md
Created July 17, 2016 15:36 — forked from magnetikonline/README.md
Example Nginx & PHP-FPM systemd service configs.

Example Nginx & PHP-FPM systemd service configs

A set of really basic systemd configs for starting Nginx and PHP-FPM on system boot.

  • Will ensure Nginx web server has started before kicking off PHP-FPM process.
  • PHP-FPM pid file placed in /run/php7, PHP7 PHP-FPM config at /etc/php7.
  • Based on usage with Ubuntu 16.04LTS.

Both scripts placed in /lib/systemd/system and enabled by the following:

@adamesss
adamesss / my.cnf
Created July 6, 2016 22:40 — forked from fevangelou/my.cnf
Optimized MySQL configuration
# Optimized MySQL configuration by Fotis Evangelou - Updated Jan 2016
#
# The settings provided below are a starting point for a 4GB-8GB RAM server with 4 CPU cores.
# If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage.
# To fine tune these settings for your system, use MySQL DB diagnostics tools like:
# https://launchpad.net/mysql-tuning-primer
# or
# http://blog.mysqltuner.com/download/
# Note that if there is no comment beside a setting, then you don't need to adjust it.