Skip to content

Instantly share code, notes, and snippets.

@tburette
tburette / fluid-main.html
Created January 30, 2024 17:23
Fluid design to handle margins of main content
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
@tburette
tburette / stagger-sample.html
Last active January 24, 2024 12:07
Responsive CSS to stagger elements horizontally progressively more as screen widen. No stagger below a minimum screen width. No stagger above a certain amount.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stagger sample</title>
<style>
/* stagger related code */
@tburette
tburette / mixin.js
Created August 12, 2022 11:19
System to create and inject mixins that work with instanceof and accessor properties
"use strict";
/**
* Make a mixin. Better than basic mixins.
*
* Basic mixin:
* let SomeMixin = {
* value: 0
* }
* Object.assign(Someclass.prototype, SomeMixin)
@tburette
tburette / regex_crossword_helper.py
Last active August 22, 2019 12:16
Regex Crossword character class solver helper
"""Helps solving https://regexcrossword.com/ that use character classes."""
def letters(string):
"""Converts a string representing a character class into the set of letters that can match it.
Args:
string (str): String representing a Character class. Can be '^A-CX-Z' or '[^A-CX-Z]'
Returns:
set: A set of (upper case) letters matching the character class
"""