I needed to inspect an HTTPS site's current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well.
nmap -p 443 --script ssl-cert [hostname]
window.addEventListener( 'DOMContentLoaded', function() { | |
var $map = $( '.jet-map-listing' ); | |
if ( ! $map.length ) { | |
return; | |
} | |
$map.on( 'jet-filter-custom-content-render', function( event, response ) { |
<?php | |
add_action('rest_api_init', 'getawayRegisterRoute'); | |
function getawayRegisterRoute() { | |
register_rest_route( 'getaway/v1', 'data', array( | |
'methods' => WP_REST_SERVER::READABLE, | |
'callback' => 'getawayDataResults' | |
)); | |
} |
#!/usr/bin/env python3 | |
# !! NOTE - this script is no longer maintained... please see the repo for further | |
# updates: https://github.com/jheddings/notes2notion | |
# this script attempts to migrate from Apple Notes to Notion while retaining as | |
# much information and formatting as possible. there are limitations to the | |
# export data from Notes, so we try to preserve the intent of the original note. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
/* I'll put here different examples of dynamic query for Oxygen repeater : | |
* - Use one of the following repeater_dynamic_query definitions | |
* in code block just BEFORE the repeater | |
* - Set the repeater custom query settings : post type, number of posts, order... | |
* - Add the remove_action in a code block AFTER the repeater | |
*/ | |
/**************************************************************************************************** | |
* Display related posts for any CPT with taxonomy: |
<?php | |
add_action( 'astra_content_loop', 'custom_post_type_loop_callback' ); | |
function custom_post_type_loop_callback(){ | |
if( "movies" == get_post_type() ) { | |
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_default' ) ); | |
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_post' ) ); | |
if ( is_singular( "movies" ) ) { | |
add_filter( 'astra_post_link', '__return_false' ); | |
} |
<?php | |
function example_ajax_enqueue() { | |
// Enqueue javascript on the frontend. | |
wp_enqueue_script( | |
'example-ajax-script', | |
get_template_directory_uri() . '/js/simple-ajax-example.js', | |
array( 'jquery' ) | |
); |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] |
Table of Contents