Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am edwinsiebel on github.
  • I am edwinsiebel (https://keybase.io/edwinsiebel) on keybase.
  • I have a public key ASBuJcPjcYVbgGE2fy0WaQBjeefSvM5FlOZPSC7NlYZ3SAo

To claim this, I am signing this object:

@edwinsiebel
edwinsiebel / .htaccess
Created January 10, 2017 09:31 — forked from schlessera/.htaccess
Redirect HTTP to HTTPS, for the main domain as well as all subdomains.
# Redirect HTTP to HTTPS, for the main domain as well as all subdomains.
#
# Example:
# http://domain.com/ => https://domain.com/
# http://subdomain.domain.com/ => https://subdomain.domain.com/
#
# Make sure you replace "replacewithyourdomain" with your actual root domain!
#
# @author: Alain Schlesser <alain.schlesser@gmail.com>
@edwinsiebel
edwinsiebel / wordpress-hacks.md
Created September 1, 2016 13:30 — forked from fliphess/wordpress-hacks.md
Wordpress hacks

Tips en Tricks om wordpress sneller en veiliger te maken.

Dit is een list met truuks om wordpress snel(ler) en veilig(er) te maken.

Alle tips zijn welkom :)

Wat iig een fijn aanknopingspunt is, is PageSpeed & YSlow. Zij maken gebruik van de best practises van yahoo en google en hebben een aantal goede tips die nog flink wat snelheid op kunnen leveren. http://gtmetrix.com

Tips

@edwinsiebel
edwinsiebel / home.php
Created August 4, 2016 20:37 — forked from itzikbenh/home.php
Very simple infinite scroll in WordPress. Handles also the back button. It will return the user to his previous position. Please read my comments.
//Just a random file for loading your posts to see that the infinite scroll works.
<?php get_header(); ?>
<div class="col-md-6 col-md-offset-3">
<div class="post-container">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="page-header post">
<h1><?php the_title(); ?></h1>
<p><?php the_excerpt(); ?></p>
</div>
@edwinsiebel
edwinsiebel / bitbucket-pipelines.yml
Created July 18, 2016 18:31 — forked from webbgeorge/bitbucket-pipelines.yml
Example bitbucket pipelines config for PHP project
image: phpunit/phpunit:4.6.10
pipelines:
default:
- step:
script:
- pecl install xdebug && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini
- composer --version
- composer install
- vendor/bin/phpunit --version
@edwinsiebel
edwinsiebel / gist:115f39af6fc2b0eed402df649a06d720
Created July 6, 2016 08:31 — forked from rutger1140/gist:5576437
Clean up WordPress wp_nav_menu
<?php
//Deletes all CSS classes and id's, except for those listed in the array below
function custom_wp_nav_menu($var) {
return is_array($var) ? array_intersect($var, array(
//List of allowed menu classes
'current_page_item',
'current_page_parent',
'current_page_ancestor',
'first',
'last',
@edwinsiebel
edwinsiebel / gist:e0b477b1332079b7773d256718e248f1
Created July 6, 2016 08:07
Redirect to new domain, keeping structure
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^old-subdomain.domain.nl$ [OR]
RewriteRule (.*)$ https://new-subdomain.domain.nl/$1 [R=301,L]
</IfModule>
@edwinsiebel
edwinsiebel / Controller.php
Created July 5, 2016 09:46 — forked from gmazzap/Controller.php
WordPress plugin to ease the creation of virtual pages.
<?php
namespace GM\VirtualPages;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @license http://opensource.org/licenses/MIT MIT
*/
class Controller implements ControllerInterface {
private $pages;
@edwinsiebel
edwinsiebel / deploy.php
Created July 3, 2016 19:57 — forked from khromov/deploy.php
Deploy WordPress with Deployer on EasyEngine
<?php
require 'recipe/common.php';
// Set configurations
set('repository', 'ssh://gogs@git.server.com:22/user/repo.git');
set('shared_files', ['public/wp-config.php']);
set('shared_dirs', ['public/wp-content/uploads']);
set('writable_dirs', []);
set('keep_releases', 10);
set('composer_command', 'composer');
@edwinsiebel
edwinsiebel / .htaccess
Created June 30, 2016 16:41 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/