Skip to content

Instantly share code, notes, and snippets.

View leogenot's full-sized avatar

Léo Genot leogenot

View GitHub Profile
@leogenot
leogenot / style.css
Last active May 14, 2025 13:46
SalesForce event form css
body {
margin: 0 !important;
padding: 0 !important;
}
form.form {
color: hsl(0, 0%, 100%);
font-family: sans-serif;
font-size: 14px;
margin: 0 !important;
padding: 0 !important;
@leogenot
leogenot / fix-scroll-position.global.ts
Created May 1, 2025 10:13
Nuxt 3 Transition page scroll issue fix
//middleware/fix-scroll-position.global.ts
export default defineNuxtRouteMiddleware((to, from) => {
useNuxtApp().hook("page:finish", () => {
if (history.state.scroll) {
setTimeout(() => window.scrollTo(history.state.scroll), 0);
} else {
setTimeout(() => window.scrollTo(0, 0), 0);
}
});
@leogenot
leogenot / nginx-wordpress-gzip-cache
Created February 7, 2024 08:52 — forked from BaronVonPerko/nginx-wordpress-gzip-cache
nginx configuration for gzip and browser caching - great for wordpress running on a Laravel Forge managed server.
#GZIP
# Enable gzip compression.
gzip on;
# Compression level (1-9).
# 5 is a perfect compromise between size and CPU usage, offering about
# 75% reduction for most ASCII files (almost identical to level 9).
gzip_comp_level 5;
# Don't compress anything that's already small and unlikely to shrink much
@leogenot
leogenot / index.html
Created May 16, 2023 20:31
Pt 6. Final Animation
<h2 id="guide" class="guide">
<span>s</span><span>o</span><span>m</span><span>e</span><span> </span><span>t</span><span>e</span><span>x</span><span>t</span>
</h2>
<h2 id="animate" class="animate">
<span>s</span><span>o</span><span>m</span><span>e</span><span> </span><span>t</span><span>e</span><span>x</span><span>t</span>
</h2>