This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Spotify Ad Muter | |
// @version 1.2 | |
// @namespace http://tampermonkey.net/ | |
// @description Detects and blocks ads on Spotify. Automatically mute Spotify ads. Turn sound on again after the ad. | |
// @match https://*.spotify.com/* | |
// @grant none | |
// @run-at document-start | |
// @downloadURL https://gist.github.com/marcbelmont/1ea63270867a4e8786dd5f172d8d4489/raw | |
// @updateURL https://gist.github.com/marcbelmont/1ea63270867a4e8786dd5f172d8d4489/raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* yoast-db-cleanup.sql | |
*/ | |
/* | |
Options | |
*/ | |
DELETE FROM prefix_options WHERE option_name = 'wpseo'; | |
DELETE FROM prefix_options WHERE option_name LIKE 'wpseo_%'; | |
DELETE FROM prefix_options WHERE option_name LIKE '_transient_timeout_wpseo_%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gets the primary term of a post, by taxonomy. | |
* If Yoast Primary Term is used, return it, | |
* otherwise fallback to the first term. | |
* | |
* @version 1.3.0 | |
* | |
* @link https://gist.github.com/JiveDig/5d1518f370b1605ae9c753f564b20b7f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('script ready'); | |
(function($) { | |
var MyYoastPlugin = function() | |
{ | |
YoastSEO.app.registerPlugin('myYoastPlugin', {status: 'loading'}); | |
this.getData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
To use: | |
1. install/set-up the google cloud api and dependencies listed on https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/texttospeech/cloud-client | |
2. install pandoc and pypandoc, also tqdm | |
3. create and download a service_account.json ("Service account key") from https://console.cloud.google.com/apis/credentials | |
4. run GOOGLE_APPLICATION_CREDENTIALS=service_account.json python make_audiobook.py book_name.epub | |
""" | |
import re | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Creates and end-point that get Yoast SEO meta tags... | |
*/ | |
add_action('rest_api_init', 'add_yoast_data'); | |
function add_yoast_data() | |
{ | |
// Add your post types here... | |
register_rest_field(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import requests | |
import urllib3 | |
def download_src(url, chunk_size=1024): | |
req = urllib3.PoolManager().request('GET', url, preload_content=False) | |
src = req.data.decode('utf-8') | |
req.release_conn() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Hide WooCommerce product images | |
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get the Yoast primary category from its post meta value, and displays it, with HTML markup. | |
* If there is no primary category set, it displays the first assigned category. | |
* | |
* @param boolean $useCatLink Whether to link the category, if it exists | |
* @return void | |
*/ | |
function yourtheme_display_yoast_primary_category( $useCatLink = true ) { |
NewerOlder