Skip to content

Instantly share code, notes, and snippets.

View slamer59's full-sized avatar

Thomas PEDOT slamer59

  • Toulouse, FRANCE
View GitHub Profile
@slamer59
slamer59 / gist:5bcf51514ade0a264868ef757e52696b
Created February 24, 2024 14:42
Extract All Album from Deezer and chrome console
// Initialize CSV string with headers
let csvContent = "Track,Artist,Album\n";
// Select all elements with the class name "JR0qJ"
const elements = document.querySelectorAll('.JR0qJ');
// Loop through each element
elements.forEach(trackElement => {
// Extract track, artist, and album information
const track = trackElement.querySelector('[data-testid="title"]').textContent.trim();
@slamer59
slamer59 / Convert-to-sqaure
Created December 1, 2022 09:28
Conversion image en carré
find . -name "*.*" -exec convert "{}" -set option:distort:viewport "%[fx:max(w,h)]x%[fx:max(w,h)]+%[fx:(w-max(w,h))/2]+%[fx:(h-max(w,h))/2]" -virtual-pixel transparent -filter point -distort SRT 0 +repage "{}" \;
{
"recommendations": [
"mhutchie.git-graph",
"ms-azuretools.vscode-docker",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"ms-kubernetes-tools.kind-vscode",
"yzhang.markdown-all-in-one",
"zaaack.markdown-editor",
"davidanson.vscode-markdownlint",
"redhat.vscode-yaml",
@slamer59
slamer59 / Markdown.md
Last active September 27, 2021 14:37
Markdown table span column

| | Header 1 | Header 2 || Header 3 || | | Subheader 1 | Subheader 2.1 | Subheader 2.2 | Subheader 3.1 | Subheader 3.2 | |==============|-----------------|----------------|----------------|----------------|----------------| | Row Header 1 | 3row, 3col span ||| Colspan only || | Row Header 2 | ^ ||| Rowspan only | Cell | | Row Header 3 | ^ ||| ^ | Cell | | Row Header 4 | Row | Each cell |: Centered :| Right-aligned :|: Left-aligned | : : with multiple : has room for : multi-line : multi-line : multi-line : : : lines. : more text. : text. : text. : text. : |--------------|-----------------|----------------|----------------|----------------|------------

find . -type f -iname "*.jpg" -exec jpegoptim -S40% {} \;
@slamer59
slamer59 / python-logger-snippet.py
Created May 4, 2021 16:14 — forked from gesquive/python-logger-snippet.py
Code snippet to setup logger in python
import logging
import logging.handlers
LOG_FILE = 'path/to/logfile'
LOG_SIZE = 1024*1024*200
LOG_COUNT = 9
log_file = LOG_FILE
dir_path = os.path.dirname(log_file)
if os.access(dir_path, os.W_OK):