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
type CombineTuples<T extends [[number] | number[]] | ([number] | number[])[]> = | |
T extends [infer A, ...infer B] | |
? A extends number[] | [number] | |
? B extends [number[] | [number]] | ([number] | number[])[] | |
? [...A, ...CombineTuples<B>] | |
: never | |
: never | |
: [] | |
type J = CombineTuples<[[1, 2, 3], [4, 5, 6]]> |
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
[alias] | |
a = add | |
aa = add --all | |
d = diff | |
dc = diff --cached | |
pl = pull | |
pu = push | |
puf = push --force | |
puom = push -u origin master | |
s = status |
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
Some tools I use regularly include: | |
- TypeScript | |
- Node.js | |
- Remix (the web framework) | |
- postgresql | |
- prisma | |
- Tailwind | |
- React | |
--- | |
- Always show code when suggesting changes, preferably first. |
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/zsh | |
# Function to copy content to clipboard | |
copy_to_clipboard() { | |
echo "$1" | pbcopy | |
} | |
# Function to process files and copy to clipboard | |
process_files() { | |
local content="" |
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 { format, zonedTimeToUtc } from "date-fns-tz"; | |
import { Group, Period } from "./types"; | |
import { prisma } from './db'; | |
/* | |
* This was copied from http://npm.im/strip-indent | |
*/ | |
export const stripIndent = (str: string) => { | |
const match = str.match(/^[ \t]*(?=\S)/gm) |
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
function findStart(strArr) { | |
const stations = strArr.slice(1).map((station) => station.split(':').map(parseInt)) | |
for (let i = 0; i < stations.length; i++) { | |
for (let i = 0; i < stations.length; i++) { | |
let curGal = 0 | |
let total = 0; | |
for (let j = 0; j < stations.length; j++) { | |
const [gallons] = stations[i + j % stations.length] | |
const [_, needed] = stations[(i + j + 1) % stations.length] | |
curGal += gallons; |
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
#!/usr/bin/env bash | |
sudo -i -u zwhitchcox xsetwacom set 'Wacom Intuos4 4x6 Pen stylus' button 3 '0' | |
# make sure to chmod this script with `chmod +x /home/zwhitchcox/.xsetwacom` |
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
# Fixes issue where laptop's monitor ports are connected to the dGPU, while the laptop screen is connected | |
# to the iGPU. This can cause extreme lag when laptop lid is closed, for soem reason (possibly the iGPU | |
# is turned off and thus unable to render the graphics). This configuration lets the iGPU render/display | |
# for the laptop and the dGPU render/display for the external monitors. | |
# Correction: Actually, it looks like all monitors are using the NVIDA driver. However, if I remove the | |
# first section, my laptop lid doesn't work so, idk | |
# This section sets up the Intel integrated graphics as the primary driver |
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
{ | |
"basics": { | |
"name": "Zane Hitchcox", | |
"label": "(Hardware/Software) (Engineer/Hacker)", | |
"email": "[email protected]", | |
"phone": "865.236.0804", | |
"url": "https://zanehitchcox.com", | |
"summary": "I'm a hardware and software engineer and hacker.\nI like solving challenging problems and creating innovative technology.\nMostly web focused and early adopter of things like NodeJS, React, Rust, Docker, Kubernetes, WASM/WASI, etc.", | |
"location": { | |
"city": "Knoxville", |
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
make clean | |
emconfigure ./configure --host=x86_64-gnu-linux --prefix=$(readlink -f prefix) --disable-imager --disable-defrag --disable-tls --disable-uuidd --disable-mmp --disable-tdb --disable-bmap-stats --disable-nls --disable-fuse2fs --disable-fsck --disable-libuuid --without-pthread CFLAGS="" | |
cp -f ../e2fsprogs/lib/ext2fs/gen_crc32ctable ./lib/ext2fs/gen_crc32ctable | |
cp -f ../e2fsprogs/util/subst ./util/subst | |
chmod +x ./util/subst | |
emmake make | |
echo 'resize2fs.js: $(RESIZE_OBJS) $(DEPLIBS) |
NewerOlder