Skip to content

Instantly share code, notes, and snippets.

@eric-pommereau
eric-pommereau / youtube-dl-recettes.md
Created November 29, 2020 08:22
Recettes youtube-dl

Recettes YOUTUBE-DL

Récupération des formats disponibles

youtube-dl -F https://url_video.com

Récupération d'un format particulier

youtube-dl -f {format} https://url_video.com

Migration WordPress

La requête suivante met à jour l’adresse de votre site dans les options de WordPress:

UPDATE wp_options SET option_value = replace(option_value, 'http://ancienneURL', 'http://www.nouvelleURL') WHERE option_name = 'home' OR option_name = 'siteurl';

La requête suivante change l’URL relative des articles dans la table wp_posts:

english e-learning notes

e-lesson : at the hotel

Vocabulary

stay = a period of time you spend in a place deposit = money given for a short time, which is returned if your hotel room is in good condition when you leave

e-Lesson : a quarter of my salary goes to household bills.

@eric-pommereau
eric-pommereau / englishVocable.md
Last active September 18, 2019 14:32
My English vocabulary notes

English vocabulary

--> My English vocabulary notes

September 2019

  • timeliness = respect des délais
  • to gather = rassembler, collecter...
  • suitable = convenable
  • somehow = d'une certaine manière
  • nevertheless = cenpendant, néanmoins
@eric-pommereau
eric-pommereau / doku_backup_and_upgrade.md
Last active November 7, 2017 13:56
Dokuwiki : backup and upgrade

Répertoires à sauvegarder

data/pages - contains your current pages
data/meta - contains meta information about your pages (like who created it originally, who subscribed to it, …)
data/media - contains your current media (images, PDFs, …)
data/media_meta - meta data for the media
data/attic - all the old versions of your pages
data/media_attic - all the old versions of your media
conf - the configuration settings

VM virtualbox apache

Montage manuel du répertoire --> /home/symfony/shared/www

Le montage est à faire avec les droits d'apache

Pour obtenir l'id du groupe et de l'utilisateur taper :

id www-data

Elasticsearch

Vagrant

Installation sur debian 8

La VM doit avoir suffisament de mémoire pour lancer JAVA.

Console

  • php bin/console doctrine:schema:update --force
  • php bin/console doctrine:generate:entities Animaux
  • php bin/console doctrine:schema:create
  • php bin/console generate:bundle
  • php bin/console doctrine:generate:form AnimauxBundle:Animal

Liens

http://www.symfony2cheatsheet.com/

@eric-pommereau
eric-pommereau / FacebookFansPython.md
Created March 28, 2017 06:06
Getting facebook fans count (Python API)

How to get Facebook page fans count with facebook python API

import facebook

# gettoken: http://stackoverflow.com/questions/3058723/programmatically-getting-an-access-token-for-using-the-facebook-graph-api

APP_ID = 'xxx'
APP_SECRET = 'xxx'