Skip to content

Instantly share code, notes, and snippets.

@julien731
julien731 / class-theme-switch.php
Created May 22, 2014 09:34
class-theme-switcher.php
<?php
/**
* Theme Switcher.
*
* @package DBA_Components
* @author Julien Liabeuf <web@n2clic.com>
* @license GPL-2.0+
* @link http://n2clic.com
* @copyright 2014 N2Clic
*/
@julien731
julien731 / breadcrumbs.php
Last active December 22, 2015 08:59
Generates a very customizable breadcrumb for WordPress. It supports all kind of content (pages, posts, archives, CPT...).
<?php
/**
* Generates a breadcrumb for WordPress
*
* This function will generate a very customizable breadcrumb
* for WordPress. It supports all kind of content (pages, posts,
* archives, CPT...).
*
* @author Julien Liabeuf <julien@liabeuf.fr>
* @copyright 2013 ThemeAvenue

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@julien731
julien731 / wpas-check.php
Last active July 25, 2016 00:32
Add extra verification to AS submission process
<?php
add_filter( 'wpas_before_submit_new_ticket_checks', 'wpas_extra_submission_check' );
/**
* Add extra verifications to the ticket submission process
*
* @param bool|WP_Error $go The submission authorization status
* @return bool|WP_Error
*/
function wpas_extra_submission_check( $go ) {
@julien731
julien731 / limit-concurrent-tickets.php
Last active July 25, 2016 06:46
Limit the number of concurrently open tickets in AS
<?php
add_filter( 'wpas_before_submit_new_ticket_checks', 'wpas_limit_concurrently_open_tickets' );
/**
* Limit the Number of Concurrent Open Tickets
*
* @param bool|WP_Error $go Submission status
*
* @return bool|WP_Error
*/
function wpas_limit_concurrently_open_tickets( $go ) {
@julien731
julien731 / install.sh
Last active August 11, 2016 12:10
Ubuntu Config
# Initial system update
sudo apt-get update && sudo apt-get upgrade
# Install system utilities
## TLP
sudo apt-get install tlp tlp-rdw
sudo tlp start
## Sublime Text 2

Keybase proof

I hereby claim:

  • I am julien731 on github.
  • I am julienliabeuf (https://keybase.io/julienliabeuf) on keybase.
  • I have a public key ASDs1NJf1sBaZwK-rB1C0mtZakgz6XQWRMXEyZXoUjfTqQo

To claim this, I am signing this object:

@julien731
julien731 / class-salesforce.php
Last active January 14, 2018 23:49
class-salesforce.php
<?php
/**
* Salesforce Web-To-Lead cURL PHP Wrapper.
*
* This class is a helper for Salesforce web-to-lead
* feature.
*
* @package Salesforce_WTL
* @version 0.1.1
* @author Julien Liabeuf <web@n2clic.com>
add_filter( 'wpas_get_custom_fields', 'wpas_make_product_required' );
/**
* Make the products field required
*
* @param array $custom_fields Registered custom fields
*
* @return array
*/
function wpas_make_product_required( $custom_fields ) {
{"precision":1,"prev_close":34.0,"data_values":[[1520276400000,32.0],[1520276460000,32.0],[1520276580000,32.0],[1520276820000,32.0],[1520276880000,32.0],[1520276940000,32.0],[1520277000000,32.0],[1520277060000,33.0],[1520277120000,33.0],[1520277300000,33.0],[1520278200000,33.0],[1520278560000,33.0],[1520278680000,32.0],[1520278740000,33.0],[1520279520000,32.0],[1520279760000,32.0],[1520279820000,33.0],[1520279940000,32.0],[1520280120000,33.0],[1520280960000,32.0],[1520281260000,32.0],[1520281320000,33.0],[1520281380000,32.0],[1520281920000,33.0],[1520281980000,32.0],[1520282220000,33.0],[1520282280000,33.0],[1520283300000,32.0],[1520283420000,32.0],[1520284080000,32.0],[1520284140000,33.0],[1520284380000,32.0],[1520284560000,32.0],[1520285340000,32.0],[1520288940000,33.0],[1520289060000,33.0],[1520289480000,32.0],[1520289540000,33.0],[1520289720000,32.0],[1520289900000,33.0],[1520290080000,33.0],[1520290440000,32.0],[1520291580000,32.0],[1520291640000,32.0],[1520291700000,32.0],[1520291880000,32.0],[152029200