Skip to content

Instantly share code, notes, and snippets.

View rozsival's full-sized avatar
🤘
I do what I like

Vít Rozsíval rozsival

🤘
I do what I like
View GitHub Profile
@rozsival
rozsival / git-worktree-setup.md
Last active January 20, 2026 22:04
Git Worktree Setup

🌳 git-worktree-setup

A utility script for cloning and setting up Git repositories as bare clones with an opinionated worktree-enabled structure.

🤔 Why?

Git worktrees are becoming the go-to solution for managing repositories with AI-driven development workflows, allowing developers to work on multiple features in parallel while your AI assistant works in separate branches without conflicts.

📦 Installation

@rozsival
rozsival / mui-grid2-codemod.md
Last active January 30, 2025 12:05
MUI `Grid2` Codemod

Codemod to convert deprecated MUI Grid component usage to Grid2. See https://mui.com/material-ui/migration/migration-grid-v2/ for more information.

This codemod works with tsx files and:

  1. Locates all Grid imports
  2. Transforms them to Grid2 as Grid
  3. Removes item prop if previously assigned to Grid
  4. Transforms all responsive props (xs, sm etc.) to new size prop.
@rozsival
rozsival / sphp
Created March 3, 2021 16:16
Easy Brew PHP-FPM switch
#!/usr/bin/env bash
latest="8.0"
versions=("7.0" "7.1" "7.2" "7.4" "$latest")
valid=$(printf "|%s" "${versions[@]}")
switch="$1"
ERROR=$(tput setaf 1)
SUCCESS=$(tput setaf 2)
if [ -z "$switch" ]
@rozsival
rozsival / ProtectedEmail.js
Last active May 15, 2018 22:32
React protected email - simple stateless component to HEX encode displayed email addresses
// @flow
import React from 'react';
import { createHtml, encode } from './utils';
import type { ProtectedEmailProps } from './types';
const ProtectedEmail = (props: ProtectedEmailProps) => (
<span
className="__react-protected-email"