Skip to content

Instantly share code, notes, and snippets.

View djibe's full-sized avatar

JB djibe

View GitHub Profile
@djibe
djibe / windows11-24H2-tpm-secureboot.md
Last active March 26, 2025 18:17
Install Windows 11 24H2 without TPM and Secure Boot requirements

Install Windows 11 24H2 without TPM and Secure Boot requirements

  1. Create a Windows 11 ISO with Microsoft's Media Creation Tool
  2. Install Setup Patchium and run it (or try latest Rufus version directly and patch from there)
  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. This will break sysinstall.
  6. Click on Create ISO button
  7. Use Rufus or Ventoy (prefered) to run installation from a USB drive
@djibe
djibe / wsl-windows11.md
Last active March 12, 2025 20:56
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.

@RickCogley
RickCogley / 1. Readme.md
Last active December 1, 2024 13:57
Deploy Hugo to Deno Deploy via Github Actions

Background

Deno Deploy is an excellent, performant and cost-effective service geared toward hosting Deno apps at the edge. It can easily host a folder of static HTML files, if you provide an index.ts to launch something like "oak" to serve them (example index.ts below).

(It's important to note that it's still officially considered beta as of May 2023, and there have been some surprising periods of downtime over the past few months... just be sure to keep that in mind)

Hugo is a phenomenally fast-building and mature SSG, which can produce a folder of static files, but requires a build step like hugo --gc --minify --verbose --baseURL=$HUGOBASEURL --ignoreCache to generate them.

Below is a yaml file you would place in your project's .github/workflows folder. If you link your Deno Deploy project using Github Actions instead of specifying an index file, it will defer to what's in this. In this case, the Hugo files generated into public are being serv

@djibe
djibe / css-memo.md
Last active November 4, 2024 17:41
State of CSS 2024 Memo

State of CSS 2024 Memo

Reset CSS

/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}
@djibe
djibe / windows10-command-tweaks.md
Last active April 1, 2025 17:20
Windows 10 Command Tweaks

Windows 10 and 11 optimizations

Minimal script

:: Check for updates
%windir%\system32\usoclient ScanInstallWait
:: Set Powermode
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61
@elejke
elejke / install-conda.sh
Last active March 15, 2025 18:41 — forked from arose13/install-conda.sh
Install Miniforge (Minimal conda installation) in Ubuntu arm64 / aarch64
# Setup Ubuntu
sudo apt update --yes
sudo apt upgrade --yes
# Get Miniforge and make it the main Python interpreter
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh -O ~/miniforge.sh
bash ~/miniforge.sh -b -p ~/miniforge
rm ~/miniforge.sh
echo "PATH=$PATH:$HOME/miniforge/bin" >> .bashrc

How to Open Link in New Tab with Hugo's new Goldmark Markdown Renderer

layouts
└── _default
    └── _markup
        └── render-link.html
@deeperton
deeperton / rgba-to-hex.sass
Last active March 28, 2025 13:18
Converter RGBA() to #HEX color with applying alpha-channel + additional opacity
// converter rgba(r, g, b, a) color to #HEX string without alpha channel,
// with optional applying afterwards opacity ($opacity)
// by default alpha channel for rgba-color is applying against white background,
// but you can change it by setting third argumnet ($background)
@function rgba-to-rgb($rgba, $opacity: 0, $background: #fff) {
@if $opacity > 0 {
@if $opacity < 1 {
$opacity: $opacity * 100
}
@return mix(mix(rgb(red($rgba), green($rgba), blue($rgba)), $background, alpha($rgba) * 100%), rgb(255,255,255), $opacity)
@jakub-g
jakub-g / async-defer-module.md
Last active March 24, 2025 07:50
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

@adactio
adactio / minimal-serviceworker.js
Last active August 18, 2023 09:15
An attempt at a minimal viable service worker.
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
// HTML files: try the network first, then the cache.
// Other files: try the cache first, then the network.
// Both: cache a fresh version if possible.
// (beware: the cache will grow and grow; there's no cleanup)
const cacheName = 'files';