This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef, useState } from 'react' | |
type OnUpdateCallback<T> = (s: T) => void | |
type SetStateUpdaterCallback<T> = (s: T) => T | |
type SetStateAction<T> = ( | |
newState: T | SetStateUpdaterCallback<T>, | |
callback?: OnUpdateCallback<T> | |
) => void | |
export function useStateEnhanced<T>(init: T): [T, SetStateAction<T>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const plugin = require('tailwindcss/plugin') | |
module.exports = { | |
plugins: [ | |
// firefox only modifier | |
plugin(({ addVariant, e, postcss }) => { | |
addVariant('firefox', ({ container, separator }) => { | |
const isFirefoxRule = postcss.atRule({ | |
name: 'supports', | |
params: '(-moz-appearance:none)', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readline = require('readline') | |
const blank = '\n'.repeat(process.stdout.rows) | |
console.log(blank) | |
readline.cursorTo(process.stdout, 0, 0) | |
readline.clearScreenDown(process.stdout) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
current_user=$(whoami) | |
# =================== welcome & notice =================== | |
echo | |
echo "User: $current_user" | |
echo | |
echo "wassssuuuuup....!" | |
echo "script will install basic tools and configs apps for the current user: $current_user" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeScript +62/ -224 █████████████▍░░░░░░░ 64.1% | |
Diff +133/ -0 ███████▎░░░░░░░░░░░░░ 34.9% |