Skip to content

Instantly share code, notes, and snippets.

View Oliviercreativ's full-sized avatar

Démontant Oliviercreativ

View GitHub Profile
@Oliviercreativ
Oliviercreativ / README.md
Last active March 25, 2018 08:03
Installez un Webserver, Git, WiringPi, NodeJS et les Librairies Python pour votre Raspberry Pi

Installez rapidement un Serveur Web, git, des librairies python, WiringPi, nodejs et Node-RED pour votre Raspberry Pi. Pratique et utile quand vous venez d'installer Raspbian.

<!DOCTYPE html><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="http://ryanscherf.net/demos/swipe/"><div style="margin:-1px -1px 0;padding:0;border:1px solid #999;background:#fff"><div style="margin:12px;padding:8px;border:1px solid #999;background:#ddd;font:13px arial,sans-serif;color:#000;font-weight:normal;text-align:left">This is Google&#39;s cache of <a href="http://ryanscherf.net/demos/swipe/" style="text-decoration:underline;color:#00c">http://ryanscherf.net/demos/swipe/</a>. It is a snapshot of the page as it appeared on 21 Nov 2010 05:48:08 GMT. The <a href="http://ryanscherf.net/demos/swipe/" style="text-decoration:underline;color:#00c">current page</a> could have changed in the meantime. <a href="http://www.google.com/intl/en/help/features_list.html#cached" style="text-decoration:underline;color:#00c">Learn more</a><br><br><div style="float:right"><a href="http://webcache.googleusercontent.com/search?q=cache:o0JlW6UUorUJ:ryanscherf.net/demos/swipe/+jquery+swipe&amp;hl
@spivurno
spivurno / gw-gravity-forms-dynamic-select.php
Last active May 17, 2021 18:55
Gravity Wiz // Gravity Forms // Dynamic Select (for Categories, Taxonomies and more)
<?php
/**
* Gravity Wiz // Gravity Forms // Dynamic Category Select
*
* Allows the user to drill down from a top level category to a child category.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/.../
@Pross
Pross / sendy.php
Created April 26, 2016 19:14
Add to mu-plugins folder, auto add every new user to a sendy list. Works with default WordPress and Woocommerce registrations.
<?php
add_action( 'user_register', 'add_user_to_sendy_list' );
function add_user_to_sendy_list( $user_id ) {
$list = 'SENDY_LIST_ID';
$url = 'http://SENDY_INSTALL_URL/subscribe';
$user = get_userdata( $user_id );
$email = $user->data->user_email;
$name = $user->data->user_nicename;
@zeshanshani
zeshanshani / events_start_end_date_WP_Query.php
Last active December 1, 2021 10:48
WP_Query 'meta_query' for "Date Start" and "Date End" custom fields. Conditions are (relation = 'OR'): 1. If "Date End" does not exist, compare "Date Start" only. 2. If "Date End" exists, show events in between that and "Date Start".
<?php
/**
* WP_Query 'meta_query' for "Date Start" and "Date End" custom fields.
* Conditions are (relation = 'OR'):
* 1. If "Date End" does not exist, compare "Date Start" only.
* 2. If "Date End" exists, show events in between that and "Date Start".
*/
'meta_query' => array(
<?php
/**
* mana functioncust and definitions.
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package mana
*/
if ( ! function_exists( 'mana_setup' ) ) :
@enamhasan
enamhasan / Show-inventory Quantity Shopify
Last active March 4, 2022 09:08
Display variant inventory quantiy on product page Shopify
# add this script in product liquid (Just before addtocart form)
<!-- Code added for Inventory in Pipeline -->
<script>
var inv_qty = {};
{% for var in product.variants %}
inv_qty[{{- var.id -}}] = {{ var.inventory_quantity | default: 0 }};
{% endfor %}
</script>
{% if current_variant.inventory_management == "shopify" %}
@alexwoollam
alexwoollam / function.php
Last active March 10, 2022 00:29 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
<?php
/**
* Disables comments, Add below to existing function.php file.
*/
/** Disable support for comments and trackbacks in post types. */
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ( $post_types as $post_type ) {
if ( post_type_supports( $post_type, 'comments' ) ) {
@wpchannel
wpchannel / mu-gravity-forms.php
Last active April 30, 2022 08:06
Best tweaks for Gravity Forms plugin for creating forms with WordPress. Enhance Bootstrap 4 compatibility and increase performances. More informations in this tutorial: https://wpchannel.com/wordpress/tutoriels-wordpress/astuces-optimiser-formulaires-gravity-forms
<?php if (!defined('ABSPATH')) die('Restricted Area');
/*
* Plugin Name: Gravity Forms Enhancements
* Description: Tweaks for Gravity Forms plugin.
* Version: 20191102
* Author: Aurélien Denis
* Author URI: https://wpchannel.com/
*/
@adamrosloniec
adamrosloniec / gist:58467267db06603dca73ff222e4b2e50
Created September 7, 2016 08:35
Wordpress with ACF - add background color to category / categories
function add_blog_category_color(){
$categories = get_categories(array( 'hide_empty' => 0, ));
if ( ! empty( $categories ) ) {
echo '<style type="text/css">';
foreach( $categories as $category ) {
$category_taxonomy = $category->taxonomy;
$category_id = $category->term_id;
$category_slug = $category->slug;
$category_color = get_field('blog_category_color',$category_taxonomy . '_' . $category_id);