Skip to content

Instantly share code, notes, and snippets.

View HeikoMamerow's full-sized avatar

Heiko Mamerow HeikoMamerow

View GitHub Profile
#!/usr/bin/env bash
# Update WordPress core plugins, themes and languages
wp core update && wp core update-db && wp language core update && wp plugin update --all && wp language plugin update --all && wp theme update --all && wp language theme update --all
/**
* Set environment type.
*
*
* Use in your wp-config.php.
+ You can put it before /* That's all, stop editing! Happy publishing. */
*
* Background info: https://make.wordpress.org/core/2020/07/24/new-wp_get_environment_type-function-in-wordpress-5-5/
*/
@HeikoMamerow
HeikoMamerow / create-a-self-signed-wildcard-ssl-cert
Last active January 3, 2018 23:56
create a self signed wildcard ssl cert
# Source: https://blog.sleeplessbeastie.eu/2016/11/14/how-to-generate-self-signed-ssl-certificate/
# Single domain
sudo openssl req -subj "/commonName=zwei.test/" -x509 -nodes -days 730 -newkey rsa:2048 -keyout zwei.test.key -out zwei.test.crt
# Wildcard domain
sudo openssl req -subj "/commonName=*.hei.test/" -x509 -nodes -days 730 -newkey rsa:2048 -keyout hei.test.key -out hei.test.crt
module.exports = {
map: { inline: false },
plugins: [
require('postcss-import')(),
require('postcss-mixins')(),
require('postcss-nested')(),
require('postcss-advanced-variables')(),
require('perfectionist')({
cascade: false,
sourcemap: true
#!/usr/bin/env node
var bs = require('browser-sync').create();
bs.init({
proxy: {
target: 'https://localhost'
},
files: [
'build/**/*',
@HeikoMamerow
HeikoMamerow / package.json
Last active July 31, 2017 10:59
For package.json
"dependencies": {
"chokidar": "^1.7.0",
"chokidar-cli": "^1.2.0",
"cssnano": "^3.10.0",
"perfectionist": "^2.4.0",
"postcss-advanced-variables": "^1.2.2",
"postcss-cli": "^4.1.0",
"postcss-cssnext": "^3.0.0",
"postcss-mixins": "^6.0.1",
"postcss-nested": "^2.0.2",
@HeikoMamerow
HeikoMamerow / docker-compose.yml
Created July 31, 2017 09:24
My docker-compose.yml for WP-Docker
version: '3'
services:
mysql:
image: mysql:latest
volumes:
- ./data/db:/var/lib/mysql
restart: always
ports:
- 3306:3306
environment:
@HeikoMamerow
HeikoMamerow / hhvminfo.php
Created February 20, 2017 11:06 — forked from ck-on/hhvminfo.php
HHVMinfo - phpinfo for HHVM HipHop Virtual Machine
<?php
/*
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.6
* revision history
0.0.6 2014-08-02 display fix for empty vs zero
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements
@HeikoMamerow
HeikoMamerow / postcss-conf.json
Last active April 24, 2017 04:11
Example of a typical PostCSS config file (cli flavor). I use this for WordPress theme development.
{
"use": [
"postcss-import",
"postcss-mixins",
"postcss-nested",
"postcss-advanced-variables",
"perfectionist",
"stylefmt",
"postcss-cssnext",
"cssnano"
@HeikoMamerow
HeikoMamerow / Nginx-make.txt
Last active February 9, 2022 13:23
Build nginx with Google PageSpeed, Brotli and other modules
How to build your custom Nginx
==============================
Works fine for me with Ubuntu 16.04.
Automated Install with pagespeed module (Google)
------------------------------------------------
If you interested, read the original
Source: https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source