Skip to content

Instantly share code, notes, and snippets.

@adamesss
adamesss / functions.php
Created April 22, 2016 00:29 — forked from maddisondesigns/functions.php
Remove Yoast SEO nag after update
<?php
class ahRemoveYoastNag_Remove_Yoast_SEO_Nag {
private $yoastPluginFile;
public function __construct() {
$this->yoastPluginFile = "wordpress-seo/wp-seo.php";
@adamesss
adamesss / ubuntu_dist_upgrade.sh
Created May 10, 2016 22:41 — forked from metral/ubuntu_dist_upgrade.sh
Non-interactive apt-get update & dist-upgrade - Ubuntu
#!/bin/bash
# update & dist-upgrade
unset UCF_FORCE_CONFFOLD
export UCF_FORCE_CONFFNEW=YES
ucf --purge /boot/grub/menu.lst
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -o Dpkg::Options::="--force-confnew" --force-yes -fuy dist-upgrade
@adamesss
adamesss / domain-nginx.conf
Created May 21, 2016 11:00 — forked from sergeifilippov/domain-nginx.conf
linux-dash with nginx
server {
server_name $domain_name;
root /var/www;
index index.html index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Cache static files for as long as possible
location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ {
try_files $uri =404;
@adamesss
adamesss / wp.sh
Created June 28, 2016 23:07 — forked from phlbnks/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser
#!/bin/bash
# Setup Variables
DBNAME=mydatabase
DBUSER=databaseuser
DBPASS=dnpass
DBHOST=localhost
DBPREFIX=C8v8D2_eomGf_
URL=http://urlofsite.com
@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.
@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 / 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 / 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 / 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'>