// dans le module VBA :
// Changez le format la case (A1 ici) selon les besoins
Option Explicit
Sub fillDate()
With Range("A1")
.Value = Now()
.NumberFormat = "mm/dd/yyyy hh:mm:ss"
End With
End Sub
// dans le "ThisWorkbook du VBAProject
// La classe “BeforeSave” est l’évenement interne qui est lancé juste avant la sauvegarde.
// Cette évenement peut alors appeler la fonction “fillDate” définie par l’utilisateur dans le modude VBA.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
fillDate
End Sub
// Avec tout ça, la case A1 ici recevra la date et l’heure d’enregistrement.
// Une façon simple d’insérer la date courante dans une cellule (et qui ne soit pas mise à jour automatiquement,
// mais manuellement quand on veut) est de faire « Ctrl + ; », puis « espace », puis « Ctrl + : », dans la cellule voulue.
/*
`domStr` here should contain everything including <html>, the styles, the title and all.
Use the printing dialogue from your browser to toggle the headers, the backgrounds.
*/
function putInIFrame() {
let domStr = "// HTML string here";
// your #iframe ; can be [hidden] to avoid it beeing shown on screen
const hideFrame = document.getElementById('iframe');
hideFrame.contentWindow.document.body.innerHTML = ""; // empty iframe in case it wasn’t empty
hideFrame.contentWindow.document.write(domStr); // write domStr to iFrame
hideFrame.contentWindow.print(); // print iframe
}
# exporter sa clé ***PUBLIQUE*** (remplacer $GPGKEY par l’adresse e-mail, d’ID ou le nom)
gpg --armor --export-options export-minimal --export $GPGKEY
# exporter sa clé ***PRIVÉE*** (remplacer $GPGKEY par l’adresse e-mail, d’ID ou le nom)
gpg --armor --export-options export-minimal --export-secret-keys $GPGKEY
@ECHO OFF
:: place le ./ dans le répertoire contenant le fichier .bat
cd %~dp0
ECHO:
ECHO Traitement de tous les fichiers .jpg, de façon récursive dans :
ECHO %~dp0
ECHO:
ECHO Ctrl+C, puis touche 'O' pour annuler, sinon touche ENTREE pour valider.
ECHO:
ECHO:
PAUSE
:: boucle sur les fichiers ET les sous dossiers du répertoire actuel
FOR /f "tokens=*" %%G IN ('DIR /b/s "*.jpg"') DO (
ECHO %%~nxG ...
:: ajoute une bande noire sur le haut de l’image (largeur=687px, hauteur=17px)
convert -fill black -stroke black -draw "rectangle 0,0 687,17" "%%G" "%%G"
:: inscrit le texte (nom du fichier) en blanc dans la bande noire
convert -font Consolas-Bold -fill white -undercolor black -pointsize 15 -gravity NorthWest -draw "text 0,0 '%%~nxG'" "%%G" "%%G"
ECHO OK.
ECHO:
)
# having a bunch of .jpg files in a certain order
# having a list.txt file with matching names for
# the jpg.
# this commande reads the list.txt and matches
# each nth line of the file to the nth file in
# the list, and renames them.
for file in *.jpg; do read line; mv $file "$line"; done < list.txt
;; get Imagemagick : https://imagemagick.org/script/download.php
;; and cd in your dir
;; Crops all JPG to 688x289 px, starting from x=1 and y=156 px.
for /f "tokens=*" %G in ('dir /b/s "*.jpg"') do mogrify -crop 688x289+1+156 "%G"
# convertir un fichier
ffmpeg -i audio.flac -c:v copy -c:a alac audio.m4a
# convertir un ensemble de fichiers
for f in ./*; do ffmpeg -i "$f" -c:v copy -c:a alac "${f%.*}.m4a"; done