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 python | |
# -*- coding: utf-8 -*- | |
''' | |
Script to parse the Wikipedia pages for common german typos and convert them | |
to Alfred Snippets. | |
See: https://de.wikipedia.org/wiki/Wikipedia:Liste_von_Tippfehlern | |
''' |
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
function my_remove_commentsip( $comment_author_ip ) { | |
return ''; | |
} | |
add_filter( 'pre_comment_user_ip', 'my_remove_commentsip' ); |
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 | |
/** | |
* Adds shortcode for PDF download element. | |
* | |
* @package your-package. | |
*/ | |
/** | |
* Add shortcode function for PDF download element. | |
* [pdf_download name="Aktuelle Produktinformationen" label="PDF DOWNLOAD" link="#"]. |
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
{"version":1,"resource":"file:///Users/simon/Repos/breitinger/dist/assets/images/logo.svg","entries":[{"id":"BLHq.svg","timestamp":1667990537506}]} |
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
const disabledPrefixes = []; | |
window.Client = { | |
cookieConsentInitialized: false, | |
cookieConsentInit: function(screenName) { | |
if (this.cookieConsentInitialized) { | |
return; | |
} |
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
/** | |
* Calculates the remaining inventory, current average buy price, total cost and total gains using FIFO (First In First Out) method. | |
* The function expects three parameters: transactionsType, transactionQuantities and transactionPrices sorted by date. | |
* | |
* Inspired by: https://www.allstacksdeveloper.com/2022/09/fifo-stock-portfolio-google-sheets.html | |
* | |
* @param {string[] | string} transactionsType - An array or a single string representing transaction types. Each string should be either 'B' for buy or 'S' for sell. | |
* @param {number[] | number} transactionQuantities - An array or a single number representing the quantities for each transaction. | |
* @param {number[] | number} transactionPrices - An array or a single number representing the prices for each transaction. | |
* @throws Will throw an error if transactionPrices and transactionQuantities are not arrays or if their lengths are not equal. |
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 requests | |
from urllib.parse import urlparse | |
import json | |
import traceback | |
import urllib3 | |
# Suppress only the single InsecureRequestWarning from urllib3 needed | |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
def follow_redirects(url): |