Skip to content

Instantly share code, notes, and snippets.

@tuguchev-andrey
tuguchev-andrey / readme.md
Last active May 3, 2022 13:17 — forked from hitautodestruct/readme.md
Generate a custom structure for Wordpress menus.

This gist is for showing an example of a custom wordpress multi-level menu.

If you want to get more from the menu item simply have a look at the $item object. i.e:

// Will return a large object with lots of props like title, url, description, id etc.
var_dump( $item );
@tuguchev-andrey
tuguchev-andrey / gist:478ea1790a1f7c5817249df9b096d367
Created December 11, 2021 20:02 — forked from 345161974/gist:63573abdf1dc9c303d6740fb29496657
Python Code for adding posts to WordPress remotely
import urllib
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods import posts
import xmlrpclib
from wordpress_xmlrpc.compat import xmlrpc_client
from wordpress_xmlrpc.methods import media, posts
import os
########################### Read Me First ###############################
'''
------------------------------------------In DETAIL--------------------------------
@jbaranski
jbaranski / OracleOpenPort80Centos.md
Created September 26, 2020 02:00
Open Port 80 Oracle Cloud Compute Instance (CentOS)

Open Port 80 Oracle Cloud Compute Instance (CentOS)

FYI This was harder than it needed to be:

  1. Looking at your instance info, find VNIC section, click "Public Subnet".
  2. Click on your security list.
  3. Add a new entry with the following options:
  • "Stateless" = No, "Source" = 0.0.0.0/0, "IP Protocol" = TCP, "Source Port Range" = All, "Destination Port Range" = 80
  1. SSH to your instance.
  2. While SSH'ed in your instance, run command firewall-cmd --permanent --add-service=http.
  3. While SSH'ed in your instance, run command firewall-cmd --reload.
  4. Now start Apache, NGINX, or whatever server you need to on port 80. You can now access from the internet.
# Read more about setting it up
# https://medium.com/@ljmocic/make-telegram-bot-for-notifying-about-new-rss-feed-items-4cfbcc37f4fd
from datetime import timedelta, datetime
from dateutil import parser
from pprint import pprint
from time import sleep
import requests
import feedparser
@marklchaves
marklchaves / custom_disable_avada_js.php
Last active April 10, 2023 01:33
Force Deregistering of Scripts in Avada--Add this to your functions.php
<?php
/**
* Kindly provided by @notebleu on the Avada Community Forum
* - https://theme-fusion.com/forums/topic/unnecessary-js-files-load-even-when-fusion-elements-disabled/#post-648617
*/
function custom_disable_avada_js() {
Fusion_Dynamic_JS::deregister_script('avada-comments');
Fusion_Dynamic_JS::deregister_script('avada-general-footer');
Fusion_Dynamic_JS::deregister_script('avada-mobile-image-hover');
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active March 17, 2026 22:44
Conventional Commits Cheatsheet
@tzkmx
tzkmx / plugin-filter.php
Last active July 11, 2020 14:25 — forked from carlodaniele/plugin-filter.php
A Must-use plugin to filter active plugins in on a per-page basis.
<?php
add_filter( 'option_active_plugins', 'test_blacklist_unneeded_plugins', 40 );
function test_blacklist_unneeded_plugins( $plugins ) {
// We don't apply blacklisting to logged in users to prevent plugin deactivation
if( isset( $_SERVER['HTTP_COOKIE'] ) && is_user_logged_muplugin() ) {
return $plugins;
}
@345161974
345161974 / gist:63573abdf1dc9c303d6740fb29496657
Created August 16, 2017 04:56 — forked from waqasjamal-zz/gist:7428185
Python Code for adding posts to WordPress remotely
import urllib
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods import posts
import xmlrpclib
from wordpress_xmlrpc.compat import xmlrpc_client
from wordpress_xmlrpc.methods import media, posts
import os
########################### Read Me First ###############################
'''
------------------------------------------In DETAIL--------------------------------
@carlodaniele
carlodaniele / plugin-filter.php
Last active November 27, 2025 14:49
A Must-use plugin to filter active plugins in on a per-page basis.
<?php
/**
* @package active-plugins
* @version 1.0
*
* Plugin Name: Active Plugins
* Plugin URI: http://wordpress.org/extend/plugins/#
* Description: This is a development plugin
* Author: Carlo Daniele
* Version: 1.0
@hitautodestruct
hitautodestruct / readme.md
Last active September 26, 2022 11:25 — forked from anonymous/gist:4344870
Generate a custom structure for Wordpress menus.

This gist is for showing an example of a custom wordpress menu.

If you want to get more from the menu item simply have a look at the $item object. i.e:

// Will return a large object with lots of props like title, url, description, id etc.
var_dump( $item );

This code works on Wordpress 4.1.1 as of 31st of March 2015