Skip to content

Instantly share code, notes, and snippets.

Working from home

Sébastien Dumont seb86

Working from home
View GitHub Profile
View dating_cards_drag_swipe_logic.js
/* dragging logic for */
/* by @levelsio */
/* MIT license */
/* <dragging logic> */
$('body').on('mousedown touchstart','.card',function(e) {
if(!currentCardUserId) return;
if($('card.match_card').is(':visible')) return;
if(typeof e.originalEvent.touches !=='undefined') {
/* touch device */
View gist:8894de69639d0ee9d3a49bfb74eebbc7
// slack2html
// by @levelsio
seb86 / slack-theme.txt
Created Apr 27, 2020
CoCart Slack Theme Palette
View slack-theme.txt
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:
seb86 / alnp-filter-template-location.php
Created Jan 21, 2019
This filters the template location for Auto Load Next Post according to your themes template location.
View alnp-filter-template-location.php
function my_template_location() {
return 'templates/';
add_filter( 'alnp_template_location', 'my_template_location' );
seb86 / Dynamic_Load_On_Scroll_Jquery.html
Created Jul 6, 2018 — forked from sphingu/Dynamic_Load_On_Scroll_Jquery.html
Loading content on scroll to bottom on page using Jquery
View Dynamic_Load_On_Scroll_Jquery.html
<title>Scroll to bottom Detection</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
var count=0;
//Will check if the user has reached bottom of a PAGE
seb86 / wpforms-gdpr-request-form.json
Created May 20, 2018
GDPR Data Request Form - Replace {{Company Name}} with the name of your company before importing into WPForms.
View wpforms-gdpr-request-form.json
[{"id":"633128","field_id":"13","fields":{"3":{"id":"3","type":"select","label":"Are you a person or an organisation?","choices":{"1":{"default":"1","label":"I'm a Person","value":"","image":""},"2":{"label":"I'm Representing an Organisation","value":"","image":""}},"description":"","required":"1","size":"large","placeholder":"","css":"","dynamic_choices":""},"0":{"id":"0","type":"name","label":"What's your name?","format":"simple","description":"","required":"1","size":"large","simple_placeholder":"","simple_default":"","first_placeholder":"","first_default":"","middle_placeholder":"","middle_default":"","last_placeholder":"","last_default":"","css":""},"11":{"id":"11","type":"text","label":"What's your organisation's name?","description":"","required":"1","size":"medium","placeholder":"","default_value":"","css":"","input_mask":"","conditional_logic":"1","conditional_type":"show","conditionals":[[{"field":"3","operator":"==","value":"2"}]]},"12":{"id":"12","type":"text","label":"VAT number for your organisa
seb86 / jquery-scroll-bottom.js
Created Apr 23, 2018 — forked from toshimaru/jquery-scroll-bottom.js
Detect the scrolling to bottom of the page using jQuery.
View jquery-scroll-bottom.js
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
// when scroll to bottom of the page
seb86 / content-alnp.php
Last active Nov 24, 2018
Auto Load Next Post template
View content-alnp.php
* The Template for displaying a post when called.
* This template can be overridden by copying it to yourtheme/auto-load-next-post/content-alnp.php.
* HOWEVER, on occasion Auto Load Next Post will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. I try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
seb86 / gist:a5446e0608e79e66b42b569cdcad9925
Created Aug 21, 2017 — forked from woogist/gist:5692886
Sample WooCommerce Points & Rewards 3rd Party Plugin Integration
View gist:a5446e0608e79e66b42b569cdcad9925
// Add the action setting
add_filter( 'wc_points_rewards_action_settings', 'points_rewards_newsletter_action_settings' );
function points_rewards_newsletter_action_settings( $settings ) {
$settings[] = array(
'title' => __( 'Points earned for newsletter signup' ),
'desc_tip' => __( 'Enter the amount of points earned when a customer signs up for a newsletter via MailChimp.' ),
You can’t perform that action at this time.