Skip to content

Instantly share code, notes, and snippets.

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

Emmanuel Joseph jekayode

🏠
Working from home
  • Ladders Technologies Limited
  • Nigeria
View GitHub Profile
@jekayode
jekayode / .htaccess
Created November 8, 2019 10:50 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://andreas-hecht.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@jekayode
jekayode / deployment_guide.md
Created August 7, 2019 02:49 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel
@jekayode
jekayode / tabbed_taxonomy.php
Created November 16, 2018 12:47 — forked from FernE97/tabbed_taxonomy.php
PHP: WordPress custom taxonomy/post query
<?php
$args = array(
'orderby' => 'ID'
);
$terms = get_terms( 'testimonial_category', $args );
?>
<!-- bootstrap tabs -->
<ul class="nav-tabs">
<?php
@jekayode
jekayode / install.md
Created November 3, 2018 10:44 — forked from yugaego/install.md
Mac OS 10.13 High Sierra Install PHP 7.0 Apache MariaDB With Homebrew
@jekayode
jekayode / macos_high_sierra_apache_php_brew_2018.md
Created November 3, 2018 10:44 — forked from karlhillx/macos_high_sierra_apache_php_brew_2018.md
macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

Homebrew Installation

First let's install Homebrew.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

@jekayode
jekayode / example_vhost_file.txt
Created October 19, 2018 12:17 — forked from zvineyard/example_vhost_file.txt
Example vhost file with SSL
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /home/yourdomain/public_html
<Directory />
Options None
AllowOverride None
Order Deny,Allow
Deny from all
@jekayode
jekayode / .htaccess
Created September 22, 2018 04:56
Leverage Browser Caching #browsercaching #optimization #htaccess
## LEVERAGE BROWSER CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
# Add correct content-type for fonts
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType image/svg+xml .svg
@jekayode
jekayode / top-parent.php
Created September 22, 2018 04:52 — forked from yanknudtskov/top-parent.php
Get topmost parent of WordPress Page
function get_top_parent_page_id() {
global $post;
$ancestors = $post->ancestors;
// Check if page is a child page (any level)
if ($ancestors) {
// Grab the ID of top-level page from the tree
@jekayode
jekayode / .htaccess
Created September 22, 2018 04:51 — forked from yanknudtskov/.htaccess
#htaccess #security
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2018
########################################################################
# ----------------------------------------------------------------------
# Rewrite from HTTP to HTTPS - if you want to use it, comment it out
# ----------------------------------------------------------------------
@jekayode
jekayode / create_user.php
Created September 22, 2018 04:48 — forked from yanknudtskov/create_user.php
Create WP User
public function custom_create_user($user_name, $first_name, $last_name, $email_address, $user_role = 'subscriber')
{
$user_id = username_exists( $user_name );
if( $user_id != null )
{
throw New Exception('Username already exists!');
}
if ( email_exists($email_address) == true )