Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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",
# 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)
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
@mvllow
mvllow / init.lua
Last active July 20, 2022 02:27
neovim playground
--- init.lua
--- https://github.com/mvllow/dots
---
--- Single file neovim config.
---
--- Filetype-specific settings are located in `/ftplugin`.
--- See `:help ftplugin`.
-- Set global leader key to later prefix custom keymaps.
-- See `:help leader`.
@mvllow
mvllow / init.lua
Created October 6, 2022 22:09
Custom statusline/winbar
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.execute("!git clone --depth 1 https://github.com/wbthomason/packer.nvim " .. install_path)
end
require("packer").startup(function(use)
use("wbthomason/packer.nvim")
use({
"rose-pine/neovim",
as = "rose-pine",
@mvllow
mvllow / foundation.css
Last active June 28, 2023 18:38
CSS reset based on Tailwind CSS Preflight
/*
Foundation 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)
*/
*,