Skip to content

Instantly share code, notes, and snippets.

View djibe's full-sized avatar

JB djibe

View GitHub Profile
@djibe
djibe / restaurer-session-firefox-perdue.md
Last active March 13, 2024 18:32
Restaurer une sessions Firefox perdue

Restaurer une session Firefox perdue

  1. Fermez le navigateur Firefox. Assurez-vous qu'aucune instance du navigateur n'est en cours d'exécution.
  2. Ouvrez le dossier de profil (C:\Users\USERNAME\AppData\Roaming\Mozilla\Firefox\Profiles, dossier le plus récent) et renommez le fichier de session en cours sessionstore.jsonlz4 en sessionstore-backup.jsonlz4.
  3. Ouvrez le dossier sessionstore-backups du profil.
  4. Renommez recovery.jsonlz4 en recovery-backup.jsonlz4.
  5. Renommez recovery.backlz4 en recovery-backup.backlz4.
  6. Copiez la sauvegarde de restauration de session que vous souhaitez restaurer, par exemple, previous.jsonlz4.
  7. Retournez au répertoire racine du profil Firefox.
  8. Collez le fichier copié dans le dossier racine.
@djibe
djibe / winget-package-create.md
Created February 2, 2024 10:52
Create a winget package

Create a winget package

You must be the owner of the package and have a valid Github account.

Run commands:

winget install wingetcreate
winget create new
@djibe
djibe / windows11-23H2-tpm-secureboot.md
Last active March 4, 2024 20:44
Install Windows 11 23H2 without TPM and Secure Boot requirements

Install Windows 11 23H2 without TPM and Secure Boot requirements

This only works for a clean installation.

  1. Create a Windows 11 ISO with Microsoft's Media Creation Tool
  2. Install Setup Patchium and run it
  3. Home tab: Select ISO, wait during processing
  4. Go to Install > Uncheck Remove upgrade and Check Disable Windows 11 compatibility restrictions, click Apply
  5. Optional: To install without a Microsoft account, go to Install OOBE tab. Click Integrate lumOOBE
  6. Click on Create ISO button
@djibe
djibe / modern-html.md
Last active September 5, 2023 10:14
Modern HTML

Modern HTML

Images

<picture>
  <source sizes="(max-width: 608px) 100vw, 680px"
    srcset="/img/photo-1920w.avif 1920w,
      /img/photo-1280w.avif 1280w,
 /img/photo-640w.avif 640w,
@djibe
djibe / ubuntu-windows11-hyperv.md
Created June 1, 2023 08:35
Ubuntu for Windows 11 with Hyper-V

Ubuntu for Windows 11 with Hyper-V

Tutorial to setup Windows 11 and use Ubuntu in a virtual machine (VM).

Requirements

  • Windows 11 Pro
  • Virtualization enabled
    • Go to Task Manager > Performance > CPU. Make sure Virtualization is Enabled.
  • If not, you must enable Virtualization in your UEFI
@djibe
djibe / hugo-tips.md
Last active January 4, 2024 08:55
Hugo static site good tips

Good tips for Hugo Static site generator

Conditionals

Range in a range of set

List 9 files published after the last 6 within the recommandations section.

{{ range first 9 ( after 6 (where site.RegularPages.ByPublishDate.Reverse "Section" "recommandations" )) }}
@djibe
djibe / wsl-windows11.md
Last active September 1, 2023 08:03
Install WSL2 in Windows 11

WSL 2 (Windows Subsystem for Linux v2) for Windows 11 installation

Install WSL components

Check Windows Update is active.

Open Start menu: search for exploit > click on "Exploit protection" result.

Go to Program settings tab. Search for C:\WINDOWS\System32\vmcompute.exe and vmwp.exe.

@djibe
djibe / nodejs-list-files-and-rename.md
Created April 11, 2023 07:24
NodeJS: list files in subfolders with special extension and export a list of renamed files
const fs = require('fs');
const path = require('path');

const directoryPath = path.join(__dirname, './content/recommandations');
const exportPath = path.join(__dirname, './data/application');

// Create the folder directory if it doesn't exist
if (!fs.existsSync(exportPath)) {
 fs.mkdirSync(exportPath);
@djibe
djibe / urql-client-demo.md
Last active February 7, 2023 19:05
Simplest URQL client demo
// Requires Node 18+, plays witk PokeApi GraphQL beta

import { createClient } from '@urql/core';

const client = createClient({
  url: 'https://beta.pokeapi.co/graphql/v1beta'
});

const query = `
@djibe
djibe / css-memo.md
Last active January 28, 2024 21:01
State of CSS 2023 Memo

State of CSS 2023 Memo

Reset CSS

/***
    The new CSS reset - version 1.11 (last updated 20.9.2023)
    GitHub page: https://github.com/elad2412/the-new-css-reset
***/