Instantly share code, notes, and snippets.

View .htaccess
Header always set Strict-Transport-Security "max-age=31536000" env=HTTPS
Header set X-Powered-By "WordPress and Lumpy Lemon"
AddDefaultCharset UTF-8
<IfModule mod_mime.c>
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
</IfModule>
<IfModule mod_headers.c>
View meta-tags.php
<?php
c::set('meta-tags.default', function(Page $page, Site $site) {
if ( $page->isErrorPage() )
return [
'title' => $page->title()
];
$title = ( $page->isHomePage() ? $site->title() : $page->title() . ' - ' . $site->title() );
View vs-code-settings.json
{
"folders": [
{
"path": "/path/to/my/workspace/folder"
}
],
"settings": {
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#d12229",
"titleBar.activeForeground": "#ffffff",
View .lando.yml
name: kirby
proxy:
appserver:
- kirby.lndo.site
mailhog:
- mail.kirby.lndo.site
services:
appserver:
type: php:7.2
via: apache
View .lando.yml
name: mysite2
recipe: wordpress
config:
php: '7.2'
via: nginx
webroot: public
xdebug: true
conf:
php: .vscode/php.ini
proxy:
View .lando.yml
name: mysite
recipe: wordpress
config:
php: '7.2'
webroot: public
xdebug: true
conf:
php: .vscode/php.ini
proxy:
mailhog:
View gulpfile.js
var gulp = require('gulp'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
sourcemaps = require('gulp-sourcemaps'),
livereload = require('gulp-livereload'),
input = {
'sass': [
'sass/**/*.scss'
]
View wp-stylesheet-loader.php
add_action( 'wp_enqueue_scripts', 'abc_styles' );
function abc_styles() {
wp_enqueue_style(
'abc',
get_stylesheet_uri(),
array(),
filemtime( get_template_directory() . '/style.css' )
);
View wp-remove-emoji.php
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
View wp-disable-rest.php
add_filter( 'rest_enabled', '_return_false' );
add_filter( 'rest_jsonp_enabled', '_return_false' );