Skip to content

Instantly share code, notes, and snippets.

Working from home

Sébastien Dumont seb86

Working from home
View GitHub Profile
kennethcassel /
Last active Apr 7, 2021
Find out how much money you've earned on Stripe while you've slept
import stripe
import time
from time import mktime
from datetime import datetime, time
import pytz
# Replace with your stripe secret key. DO NOT SHARE YOUR STRIPE KEY
stripe.api_key = ""
View Better Stripe Invoice Generator by @levelsio
# MIT license, do whatever you want with it
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
jessepearson / functions.php
Last active Jan 27, 2021
Disables opening Terms and Conditions on WooCommerce Checkout page in an inline form and instead open in a new tab or window.
View functions.php
<?php // do not copy this line
* Disables opening the Terms and Conditions page in an inline form on the Checkout page.
* The Terms and Conditions link will then open in a new tab/window.
add_action( 'wp', function() {
remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_checkout_privacy_policy_text', 20 );
remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_terms_and_conditions_page_content', 30 );
} );
View add-colors-and-gradients-to-gutenberg.php
* Block Editor Settings.
* Add custom colors and gradients to the editor.
function tabor_add_colors_and_gradients() {
$colors = array(
'primary' => '#db1c7d',
'secondary' => '#a528f0',
'tertiary' => '#90cbff',
seb86 / wcs-contract-subscription.php
Last active Apr 25, 2020
Disables certain action buttons for weekly subscriptions and subscriptions with a free trial. Weekly subscriptions can not be cancelled for at least a year.
View wcs-contract-subscription.php
* Plugin Name: WooCommerce Subscriptions - Contract Subscriptions
* Description: Disables certain action buttons for weekly subscriptions and subscriptions with a free trial. Weekly subscriptions can not be cancelled for at least a year.
* Author: Sébastien Dumont
* Author URI:
* Version: 0.0.2
* License: GNU General Public License v3.0
* License URI:
levelsio / obfuscate.php
Last active Dec 10, 2020
WordPress plugin to progressively obfuscate text like
View obfuscate.php
1) put this in your functions.php file
2) add this to the post you want to obfuscate, on top
3) [obfuscate]
4) to start obfuscating, add a HTML code or HTML block with <start></start>
jasonbahl / disable-frontent.php
Last active Apr 16, 2021
Disable frontend but allow REST, CRON and GraphQL Requests
View disable-frontent.php
add_action( 'parse_request', 'disable_front_end', 99 );
function disable_front_end() {
global $wp;
* If the request is not part of a CRON, REST Request, GraphQL Request or Admin request,
ahmadawais /
Last active May 17, 2021
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course →

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode

Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User


  • Make sure your Local by FlyWheel WordPress install is a custom install
noopkat / chat.js
Last active Apr 11, 2020
Streamlabs Dracula Themed Chat Box
View chat.js
const setup = () => {
const nearestColorScript = document.createElement('script');
nearestColorScript.onload = onScriptLoad;
nearestColorScript.src = '';
const onScriptLoad = () => {
console.log('nearest color script loaded');
ChrisFlannagan / geodistance.php
Created Oct 13, 2017
Calculate distance between to coordinates of latitude and longitude using the WP REST API and return posts ordered by distance from user's coordinates
View geodistance.php
* Heavily borrowed from:
class CoordinatesTable extends DB {
protected $db_option = "coordinates_db";