Skip to content

Instantly share code, notes, and snippets.

View pankajpatel's full-sized avatar
🎯
Focusing

Pankaj Patel pankajpatel

🎯
Focusing
View GitHub Profile
# ===========================================
# ZSH Hacks - Dreams of Code
# ===========================================
# Add these to your .zshrc file
# ===========================================
# -------------------------------------------
# 1. Edit Command Buffer
# -------------------------------------------
# Open the current command in your $EDITOR (e.g., neovim)
@omltcat
omltcat / caddy_labels.md
Last active May 16, 2026 09:35
Caddy with Docker Labels: Easy config for wildcard certs and Authelia

What is this?

One great feature of caddy-docker-proxy is that you can quickly define config rules with Docker Compose labels in each containers on the fly like Traefik, instead of at a centralized place. With this feature, we can define everything in compose files, and don't ever need to mess with a config file (Caddyfile or JSON).

Taking advantage of snippets, I created this docker-compose.yaml example so that you can quickly define routing rules and add authetication like Authelia with just 3 lines of labels below each docker container you use.

With this example, should not ever need to manually edit Caddyfile config.

When you add a new container, you just need to do this:

networks:
@andrecastelo
andrecastelo / NewTypography.tsx
Last active August 1, 2024 06:35
Prop Forwarding with Emotion, Material-UI and Material-UI-System
import styled from '@emotion/styled';
import {
Typography as MaterialTypography,
TypographyProps as MaterialTypographyProps,
} from '@material-ui/core';
import {
spacing,
SpacingProps,
sizing,
SizingProps,
@jonlabelle
jonlabelle / npm_version_cheatsheet.md
Last active May 13, 2026 02:11
npm version cheatsheet

npm version cheatsheet

npm uses Semantic Versioning.

MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]
Part Meaning
@pankajpatel
pankajpatel / css-grid-bg.css
Created December 18, 2020 21:39
From Storybook
:root {
--grid-size: 10px;
--cell-amount: 10;
--grid-line-opacity: .4;
--grid-offset-x: 20px;
--grid-offset-y: 20px;
}
.with-grid-lines {
@kennethnwc
kennethnwc / .dockerignore
Last active July 28, 2024 08:09
My docker-compose with nextjs and nginx
.next/
node_modules/
Dockerfile
yarn-error.log
.dockerignore
.git
.gitignore

What Hiring Should Look Like

This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.

I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.

But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.

If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.

@wojtekmaj
wojtekmaj / .gitignore
Last active April 26, 2026 10:06
How to upgrade Yarn to Yarn Modern (v4 at the moment) seamlessly
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
@tlakomy
tlakomy / Notes.md
Last active January 13, 2020 21:40
Notes from Build an App with React Suspense, Hooks, and Context Workshop Setup with Michael Chan

Egghead Workshop Notes

Notes from Build an App with React Suspense, Hooks, and Context Workshop Setup with Michael Chan

  • Write a detailed README with contact info, info about the workshop itself, license etc
  • Create a folder for each lesson so folks won’t have to struggle with switching git branches every 15 minutes
  • Give everyone a minute to process what they’ve learned and to figure out whether they have questions
  • Reference the docs so once the workshop concludes everyone knows where to find the resources to refresh what they’ve learned
  • As with egghead lessons, guide their eyes - if you’re explaining something, then select it in your IDE (at least hover over it)
  • Take a minute to go over the questions from the chat, read the question out loud
  • Don’t be afraid to experiment when there’s an interesting question, we’re all nerds here who love to try out new stuff
@arnausd23
arnausd23 / plop.md
Created August 27, 2019 13:24
Plop js

What is Plop

​ Plop is a file generator tool system which allows you to define a script file to generate all the boilerplate files for you. Similar in how Angular schematics works, you can define a set of actions who would generate all the pre-defined code for you either automatically or by answering to some CLI prompts. ​ First you will need to define a plopfile.js who would contain a function who would receive a plop object with access to all the methods to generate the code. ​

module.exports = function (plop) {
    plop.setGenerator('components', {