Skip to content

Instantly share code, notes, and snippets.

View neverything's full-sized avatar
🍀
Good vibes for you

Silvan Hagen neverything

🍀
Good vibes for you
View GitHub Profile
@neverything
neverything / remove-jetpack-css.php
Last active February 17, 2016 16:57 — forked from mwolff44/gist:abfc7848e5cfa35b8c6a
Should be enough to just remove jetpack.css
<?php
/*
MU Plugin: remove-jetpack-css
Plugin Name: WP Remove jetpack.css
Plugin URI: http://required.ch
Description: Removes the jetpack.css
Version: 1.0
Author: Silvan Hagen
Author URI: http://www.silvanhagen.com
License: GPLv3
vagrant plugin update $(vagrant plugin list |awk '/^[:alnum:]/i {print $1}')
@neverything
neverything / <stage>.rb
Last active March 6, 2021 12:32
Dirty opcache_reset() for capistrano deployments to shared php envs without access to restart the server. With some recommended settings for the opcache configuration in php.ini
# In your config/deploy/<stage>.rb files add the correct path which is publicly curlable :D
# Opcache file url
set :opcache_file_url, "https://<add_public_url_of_stage>/opcache_clear.php"
#user-feedback-init-button,
#user-feedback-bottombar,
.user-feedback-modal,
.user-feedback-annotation {
z-index: 100;
}
#user-feedback-canvas {
z-index: 99;
}
@neverything
neverything / empty-span-highlight.css
Created September 14, 2016 09:33
Highlight empty spans that have an `id` on a page, useful for editor styles in WP for example.
span:empty::before {
content: attr(id);
}
span:empty {
display: block;
border: 1px dashed black;
}
<?php
/*
* Plugin Name: Post Likes
* Description: WP REST API Post Likes
* Author: Joe Hoyle
* Version: 1.0
* Author URI: http://joehoyle.co.uk
*/
@neverything
neverything / dashicons.php
Created July 6, 2017 08:53 — forked from scottsweb/dashicons.php
An array of the WordPress dashicons http://melchoyce.github.io/dashicons/.
<?php
$icons = array(
'menu-icon-dashicons-menu' => __('Menu', 'iconic'),
'menu-icon-dashicons-dashboard' => __('Dashboard', 'iconic'),
'menu-icon-dashicons-admin-site' => __('Admin Site', 'iconic'),
'menu-icon-dashicons-admin-media' => __('Admin Media', 'iconic'),
'menu-icon-dashicons-admin-page' => __('Admin Page', 'iconic'),
'menu-icon-dashicons-admin-comments' => __('Admin Comments', 'iconic'),
'menu-icon-dashicons-admin-appearance' => __('Admin Appearance', 'iconic'),
@neverything
neverything / cpanel-find-wp.sh
Last active August 25, 2020 17:44
Find installed WordPress on cPanel servers using SSH and the command line. https://silvanhagen.com/find-old-wordpress-installs/
# Change the path below according to your hosting
# - Add a cron job to get an email every week :)
find /home/*/public_html/ -type f -iwholename "*/wp-includes/version.php" -exec grep -H "\$wp_version =" {} \;
# Empty lines to make it easy to copy