This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="yes" name="apple-mobile-web-app-capable"> | |
<title>iOS Web App</title> | |
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" title="main" href="normalize.min.css" type="text/css"> | |
<link rel="stylesheet" title="main" href="main.css" type="text/css"> | |
<link rel="alternate stylesheet" title="red" href="red.css" type="text/css"> | |
<link rel="alternate stylesheet" title="blue" href="blue.css" type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
@name Server Logs Viewer | |
@description Emulates the tail() function. View the latest lines of your LAMP server logs in your browser. | |
@author Alexandre Plennevaux (pixeline.be) | |
@team Oleg Basov ([email protected]) | |
@date 16.12.2015 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// In your theme's functions.php file. | |
add_action( 'pre_get_posts', 'alter_the_main_query' ); | |
function alter_the_main_query( $wp_query ){ | |
if(is_admin() || !$wp_query->is_main_query()){ | |
// pre_get_posts is launched on ALL requests. So we get out early if this is a wp-admin url request or if this is not the main query. | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes). | |
by [email protected] | |
credits: Raz Ohad https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress | |
*/ | |
//mimic the actual admin-ajax | |
define('DOING_AJAX', true); | |
if (!isset( $_REQUEST['action'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin template.email | |
ServerName template.url | |
ServerAlias www.template.url | |
# redirect www.domain.tld to domain.tld | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC] | |
RewriteRule ^ https://%1%{REQUEST_URI} [L,QSA,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# script automatisant la création d'un compte hébergé: utilisateur + dossier + virtualhost | |
# Enter dummy password if you wish to attach domain to an existing user. | |
: ' | |
HOW-TO | |
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld | |
Arguments: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* purge.php | |
* Clears serverside caches (finetuned for wordpress on gandi.net simplehosting instances): Varnish, APC, WP Transients, WP Super Cache, W3 Total Cache | |
*/ | |
header("Cache-Control: max-age=1"); // don't cache ourself | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |