Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥
On Fire

Navin Moorthy navin-moorthy

🔥
On Fire
View GitHub Profile
@navin-moorthy
navin-moorthy / tailwindcss+2.2.7.patch
Created Aug 4, 2021
Tailwind JIT - Prepend stackable variant before DEFAULT utilities
View tailwindcss+2.2.7.patch
diff --git a/node_modules/tailwindcss/lib/jit/lib/generateRules.js b/node_modules/tailwindcss/lib/jit/lib/generateRules.js
index 9b59423..c2f8660 100644
--- a/node_modules/tailwindcss/lib/jit/lib/generateRules.js
+++ b/node_modules/tailwindcss/lib/jit/lib/generateRules.js
-function applyVariant(variant, matches, context) {
+function applyVariant(variant, matches, hasLibVariant, context) {
if (matches.length === 0) {
return matches;
@navin-moorthy
navin-moorthy / tailwindcss+2.2.7.patch
Created Aug 4, 2021
Temporary patch to workaround this issue - JIT Prepend stackable variant before DEFAULT utilities CSS
View tailwindcss+2.2.7.patch
diff --git a/node_modules/tailwindcss/lib/jit/lib/generateRules.js b/node_modules/tailwindcss/lib/jit/lib/generateRules.js
index 9b59423..c2f8660 100644
--- a/node_modules/tailwindcss/lib/jit/lib/generateRules.js
+++ b/node_modules/tailwindcss/lib/jit/lib/generateRules.js
-function applyVariant(variant, matches, context) {
+function applyVariant(variant, matches, hasLibVariant, context) {
if (matches.length === 0) {
return matches;
View theme.json
{
"button": {
"base": "lib:flex lib:flex-row lib:justify-center lib:items-center",
"variant": {
"ghost": "lib:text-gray-800",
"secondary": "lib:bg-gray-100 lib:text-gray-800",
"outline": "lib:border lib:border-gray-300 lib:text-gray-800",
"primary": "lib:bg-gray-800 lib:text-white"
},
"size": {
View git-cleanup-repo.sh
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
View generate-tailwind-properties.js
#!/usr/bin/env node
// With the help of https://gist.github.com/kentcdodds/bb452ffe53a5caa3600197e1d8005733
// Thanks Kent C. Dodds
const spawnSync = require("child_process").spawnSync;
const styles = {
// got these from playing around with what I found from:
// https://github.com/istanbuljs/istanbuljs/blob/0f328fd0896417ccb2085f4b7888dd8e167ba3fa/packages/istanbul-lib-report/lib/file-writer.js#L84-L96
@navin-moorthy
navin-moorthy / power-mode-vs-code.json
Last active Aug 12, 2020
VS Code Power Mode Smokey Effect
View power-mode-vs-code.json
{
"powermode.enabled": true,
"powermode.enableStatusBarComboTimer": false,
"powermode.enableShake": false,
"powermode.customExplosions": ["https://media.giphy.com/media/l378dE2QwudKXK1pK/giphy.gif"],
"powermode.explosionOrder": "sequential",
"powermode.explosionSize": 12,
"powermode.explosionFrequency": 1,
"powermode.maxExplosions": 1,
"powermode.explosionOffset": 0.5,
@navin-moorthy
navin-moorthy / paste-github-labels.js
Last active Jul 19, 2020
Paste Github labels to your repo
View paste-github-labels.js
// Ref: [cdlhub/import-github-labels.md](https://gist.github.com/cdlhub/02f59220d842b5a32d282f58bd502c11)
[
{
"name": "good first issue 👍",
"description": "Good for newcomers",
"color": "7057ff"
},
{
"name": "good for beginners 😃",
View chakra-ui-github-labels.json
{
"chakra-ui-labels": [
{
"name": "good first issue 👍",
"description": "Good for newcomers",
"color": "7057ff"
},
{
"name": "good for beginners 😃",
"description": "A fairly new React developer can fix",
@navin-moorthy
navin-moorthy / github-extract-labels.js
Last active Jul 19, 2020
Extract Labels from Github
View github-extract-labels.js
// Ref- [amesperrin](https://gist.github.com/MoOx/93c2853fee760f42d97f#gistcomment-3069259)
var labels = [];
[].slice.call(document.querySelectorAll(".js-label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
description: element.getAttribute("title"),
// using style.backgroundColor might returns "rgb(...)"
color: element.getAttribute("style")
View chakra-ui-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.