Skip to content

Instantly share code, notes, and snippets.

View matijs's full-sized avatar
:dependabot:
Scouting turtles

matijs matijs

:dependabot:
Scouting turtles
View GitHub Profile
@matijs
matijs / ipv6guide.md
Created June 18, 2024 05:51 — forked from timothyham/ipv6guide.md
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

/*
* How to get the scrolling element in charge of scrolling the viewport:
*
* - in Quirks mode the scrolling element is the "body"
* - in Standard mode the scrolling element is the "documentElement"
*
* webkit based browsers always use the "body" element disrespectfull of the specifications:
* http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop
*/
function getScrollingElement() {
@matijs
matijs / postforms.js
Last active August 29, 2015 13:57 — forked from adactio/postforms.js
/*
Show a progress element for any form submission via POST.
Prevent the form element from being submitted twice.
*/
(function ( win, doc ) {
'use strict';
if ( !win.addEventListener ) {
// doesn't cut the mustard.
return;
}
@matijs
matijs / gist:3237085
Created August 2, 2012 13:24 — forked from icaaq/gist:3235454
triggers click on spacebar key
/*
MDN: using the button role https://developer.mozilla.org/en/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role
-----
Warning: Be careful when marking up links with the button role. Buttons are expected to be triggered using the Space key,
while links are expected to be triggered through the Enter key. In other words, when links are used to behave like buttons,
adding role="button" alone is not sufficient. It will also be necessary to add a key event handler that listens for the
Space key in order to be consistent with native buttons.
-----
*/
@matijs
matijs / utmstrip.user.js
Created September 22, 2011 16:30 — forked from paulirish/utmstrip.user.js
userscript: Drop the UTM params from a URL when the page loads
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace http://github.com/paulirish
// @version 1.1
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http://*
// ==/UserScript==