Skip to content

Instantly share code, notes, and snippets.

View wKovacs64's full-sized avatar
🍸

Justin Hall wKovacs64

🍸
View GitHub Profile
@wKovacs64
wKovacs64 / new-arch-notes.md
Created March 4, 2024 06:57
New Architecture

Options for New Architecture

Hosts/Platforms

Cloudflare

  • Cloudflare Pages (static assets + serverless functions)
  • Cloudflare CDN

AWS (SST)

@wKovacs64
wKovacs64 / fixed-width-numbers.css
Created February 15, 2018 21:45
Fixed width numbers CSS
/* https://twitter.com/wesbos/status/932644812582522880/ */
font-feature-settings: "tnum";
font-variant-numeric: tabular-nums;
@wKovacs64
wKovacs64 / cn.tsx
Created January 17, 2023 01:39
cn: wrapper around clsx and tailwind-merge
// Source: https://mobile.twitter.com/shadcn/status/1614692419039105024
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: Array<ClassValue>) {
return twMerge(clsx(inputs));
}
@wKovacs64
wKovacs64 / mq.ts
Created May 26, 2020 14:25
CSS-in-JS Media Query Utility Function in TypeScript
const breakpointMap = {
// mobile-first, so there is no 'xs' for portrait phones
sm: 576, // landscape phones
md: 768, // tablets
lg: 992, // landscape tablets and desktops
xl: 1200, // extra large desktops
};
type Breakpoints = typeof breakpointMap;
type BreakpointLabel = keyof Breakpoints;
@wKovacs64
wKovacs64 / DividerItemDecoration.java
Last active August 29, 2015 14:24 — forked from AviBenHamo/DividerItemDecoration.java
DividerItemDecoration updated with grid support and without deprecation
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software