Skip to content

Instantly share code, notes, and snippets.

View vmanthos's full-sized avatar

Vasilis Manthos vmanthos

  • Thessaloniki, Greece
  • 11:21 (UTC +03:00)
  • X @vmanthos
View GitHub Profile
@bradtraversy
bradtraversy / docker-help.md
Last active July 9, 2024 10:18
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@WordBits
WordBits / snippet.php
Created June 24, 2018 05:31
Prints all actions that have fired within a particular request. Useful for debugging.
<?php
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/list-all-wordpress-actions-fired/
// Created by: jeffmatson
?>
<?php
add_action( 'shutdown', function(){
foreach( $GLOBALS['wp_actions'] as $action => $count )
printf( '%s (%d) <br/>' . PHP_EOL, $action, $count );
});
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@ciorici
ciorici / index.php
Created April 27, 2017 08:10
Featured Products Loop in WooCommerce 3.0
<ul class="products">
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => 12,
'tax_query' => array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
add_filter( 'rocket_cache_reject_ua', 'wprocket_remove_fb_ua' );
function wprocket_remove_fb_ua( $ua ) {
if ( in_array( 'facebookexternalhit', $ua ) ) {
$ua = array_flip( $ua );
unset( $ua[ 'facebookexternalhit' ] );
$ua = array_flip( $ua );
}
return $ua;
}
@gecon
gecon / improved_greek_uppercase.php
Last active November 15, 2022 13:08
uppercase greek without accents (php solution)
<?php
/***********************************************************************
A simple PHP function that will correctly uppercase Greek language
with proper spelling rules (removing accents in uppercased letters).
This is a server-side alternative to CSS uppercase() for Greek.
Greek CSS uppercase() is not working right on some browsers.
You can fix this by using javascript (increases browser load time) or
in server side by using this function here.
@zmiftah
zmiftah / springer-free-maths-books.md
Created December 29, 2015 05:58 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@lukecav
lukecav / gist:6bbd6377620f10e49b38
Created December 28, 2015 21:48
Footer Divi Theme Child
<?php if ( 'on' == et_get_option( 'divi_back_to_top', 'false' ) ) : ?>
<span class="et_pb_scroll_top et-pb-icon"></span>
<?php endif;
if ( ! is_page_template( 'page-template-blank.php' ) ) : ?>
<footer id="main-footer">
<?php get_sidebar( 'footer' ); ?>
@MikeNGarrett
MikeNGarrett / wp-config.php
Last active July 17, 2024 18:02
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@SGudbrandsson
SGudbrandsson / index.php
Last active June 10, 2023 01:11
Create a WordPress staging area from your live wordpress setup with a Click-of-a-button [TM] ..
<?php
/**
*
* This script will copy your wordpress from public_html (or wherever)
* and place it in a staging folder.
* It will then clone the database, reconfigure the config file
* and replace URL's from the original URL to your staging URL.
* It will then make sure to NOT allow search engines to index the page.
*
* Use this script to clone your main wp in order to test maintenance work