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
// ==UserScript== | |
// @name Premium SO | |
// @namespace pso | |
// @include http://www.sudouest.fr/* | |
// @grant none | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js | |
// ==/UserScript== | |
window.setTimeout( | |
function(){ |
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
// Add to functions.php | |
/*=================================================== | |
Created by sk from Renegade Empire with help | |
from these sources: | |
http://docs.woothemes.com/document/editing-product-data-tabs/ | |
http://www.sean-barton.co.uk/2013/03/remove-woocommerce-20-reviews-tab/#.UYnWe7XfB6N | |
http://www.sean-barton.co.uk/2013/03/sb-add-woocommerce-tabs-wordpress-plugin/#.UYrYL7XfB6M |
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 | |
Copied from http://fatlabmusic.com/blog/2009/08/12/how-to-fix-wp-http-error-name-lookup-timed-out/ | |
//adjustments to wp-includes/http.php timeout values to workaround slow server responses | |
add_filter('http_request_args', 'bal_http_request_args', 100, 1); | |
function bal_http_request_args($r) //called on line 237 | |
{ | |
$r['timeout'] = 15; | |
return $r; | |
} | |
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
{"_last_updated":"Tue, 14 Mar 2017 20:53:58 +0000","ID":"CF58c8565442824","cf_version":"1.5.0.6","name":"Destinaire conditionnel","scroll_top":0,"description":"\t\t\t\t\t\t\t","success":"Form has been successfully submitted. Thank you.\t\t\t","db_support":1,"pinned":0,"hide_form":1,"check_honey":1,"avatar_field":"","form_ajax":1,"custom_callback":"","layout_grid":{"fields":{"fld_6594946":"1:1","fld_453118":"1:2","fld_8539935":"1:2","fld_7213609":"1:2","fld_6561980":"2:1","fld_2410344":"2:1"},"structure":"6:6|12"},"fields":{"fld_6594946":{"ID":"fld_6594946","type":"radio","label":"Mes dates","slug":"mes_dates","conditions":{"type":""},"required":1,"caption":"","config":{"custom_class":"","inline":1,"auto_type":"","taxonomy":"category","post_type":"post","value_field":"name","orderby_tax":"count","orderby_post":"ID","order":"ASC","default":"","show_values":1,"option":{"opt1921855":{"value":"date1","label":"Date 1"},"opt1194856":{"value":"date2","label":"Date 2"},"opt1560618":{"value":"date3","label":"Date 3"}}} |
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_acf_default_cat( $field ) { | |
if( isset( $_GET['cat'] ) && ! empty ( $_GET['cat'] ) ) { | |
$field['default_value'] = esc_attr( $_GET['cat'] ); | |
} | |
return $field; | |
} | |
add_filter('acf/load_field/key=field_58a2165345a9e', 'my_acf_default_cat'); |
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 | |
/** | |
* Filter the available status to add a custom one | |
* | |
* Requires buddy-bbpress-support topic plugin | |
* bbPress 2.5+ | |
* WordPress 4.0 | |
* | |
* @param array $allstatus the available status |
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 | |
/** | |
* Template part pour afficher les horaires des cinémas | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
*/ | |
defined( 'ABSPATH' ) or wp_die(); | |
$type = get_field( 'type' ); |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |