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 | |
/* WordPress Related Post */ | |
function related_article($number) { | |
$tags[] = get_the_tags(); | |
foreach($tags as $tag) : | |
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 | |
function buildBaseString( $baseURI, $method, $params ) { | |
$r = array(); | |
ksort( $params ); | |
foreach ( $params as $key=>$value ) { | |
$r[] = "$key=" . rawurlencode( $value ); | |
} | |
return $method."&" . rawurlencode( $baseURI ) . '&' . rawurlencode( implode( '&', $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
jQuery(document).ready(function () { | |
$(".slide").not(".current").hide(); | |
setInterval(function() { | |
$(".current").nextAll(".slide").first().slideDown("slow").addClass("current"); | |
$(".current").prevAll().removeClass("current"); | |
$(".slide").not(".current").hide(); | |
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 function the_breadcrumb() { | |
global $wp_query; | |
$name = single_cat_title ( '' '', false); | |
$category_id = get_cat_ID( $name ); | |
$category = get_the_category(); | |
$category_link = get_category_link( $category_id ); | |
//Categorie Parents | |
$object = $wp_query->get_queried_object(); |
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 | |
$img_src = get_stylesheet_directory_uri() . '/img/default_image.jpg'; | |
$title = "Sonia SAUGRIN - Freelance Web"; | |
$description = "Les technologies sont pour moi une façon d'aider les gens, ils donnent un pouvoir à ceux qui les utilisent. Le pouvoir de partager, de liaison, de parler avec la terre entière."; | |
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
if(is_single()) : | |
if(has_post_thumbnail($post->ID)) : |
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
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - | |
($HOME/.dropbox-dist/dropboxd &)& #Lancer Dropbox en arrière plan | |
# Editer le fichier cron crontab -e | |
30 02 * * * mysqldump -u user -ppassword --all-databases | gzip > ~/Dropbox/site.sql.gz | |
00 02 * * * tar -zcf ~/Dropbox/site-content.tgz /var/www/prod/blog/wp-content |
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
#SSL Config | |
# to generate your dhparam.pem file, run in the terminal | |
# openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 | |
ssl_dhparam /etc/nginx/ssl/dhparam.pem; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; | |
ssl_session_cache shared:SSL:1m; |
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
[ | |
{ | |
"name": "Les Avirons", | |
"postcode" : "97425", | |
"city" : "Les Avirons" | |
}, | |
{ | |
"name": "Bagatelle", | |
"postcode" : "97441", | |
"city" : "Sainte-Suzanne" |
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
version: '3.3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress |
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 | |
/** | |
* PHPMailer simple contact form example. | |
* If you want to accept and send uploads in your form, look at the send_file_upload example. | |
*/ | |
//Import the PHPMailer class into the global namespace | |
use PHPMailer\PHPMailer\PHPMailer; | |
require 'vendor/autoload.php'; | |
if (array_key_exists('to', $_POST)) { | |
$err = false; |
OlderNewer