Skip to content

Instantly share code, notes, and snippets.

@mvllow
mvllow / foundation.css
Last active October 27, 2025 16:07
CSS reset based on Tailwind CSS Preflight
/*
foundation.css
https://gist.github.com/mvllow/b2b38d2968c1b3b6a393556530a8f65f
Inspired by Tailwind CSS Preflight (https://tailwindcss.com/docs/preflight)
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
function use_terminal_colors
# Syntax highlighting variables
# https://fishshell.com/docs/current/interactive.html#syntax-highlighting-variables
set -U fish_color_normal normal
set -U fish_color_command magenta
set -U fish_color_keyword blue
set -U fish_color_quote yellow
set -U fish_color_redirection green
set -U fish_color_end brblack
set -U fish_color_error red
# Usage:
# cd Downloads
# sh extract-vsix.sh mvllow.rose-pine-0.3.5
# ^ do not include .vsix
path="$1"
name="$(basename -- $1)"
out_dir=~/.vscode/extensions
tmp_dir=$(mktemp -d -t mvllow-dots)
@mvllow
mvllow / tailwindcss-theme.ts
Last active March 21, 2020 19:17
Tailwind CSS colors ready for any ThemeProvider or similar. https://tailwindcss.com/
// Theme as of v1.2.0
const theme = {
gray: {
100: "#f7fafc",
200: "#edf2f7",
300: "#e2e8f0",
400: "#cbd5e0",
500: "#a0aec0",
600: "#718096",
700: "#4a5568",
@mvllow
mvllow / .eslintrc.js
Last active January 23, 2021 21:01
airbnb eslint + react + prettier + (optional) typescript
/*
# airbnb
# supports react + hooks
$ npx install-peerdeps --yarn --dev eslint-config-airbnb
# with prettier
$ yarn add --dev prettier eslint-config-prettier eslint-plugin-prettier
*/
@mvllow
mvllow / git-chop.sh
Last active December 18, 2020 23:18
chop (merged) local branches
git branch --merged | egrep -v "(^\*|master|main)" | xargs git branch -d