Skip to content

Instantly share code, notes, and snippets.

View zacharytyhacz's full-sized avatar
🧊
Chilling

zac zacharytyhacz

🧊
Chilling
View GitHub Profile
@zacharytyhacz
zacharytyhacz / init.lua
Created May 22, 2025 02:20
finally lua vim rc
-- ~/.config/nvim/init.lua
-- bootstrap lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git", "clone", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath
})
@zacharytyhacz
zacharytyhacz / useResponsiveStyles.ts
Created February 9, 2025 01:24
react native useResponsiveStyles.ts hook
import { useMemo, useCallback } from 'react'
import {
useWindowDimensions,
StyleSheet,
ViewStyle,
TextStyle,
ImageStyle
} from "react-native";
@zacharytyhacz
zacharytyhacz / nextjs15-nginx.conf
Created December 16, 2024 18:01
Nextjs 15 NGINX config
# must run `npm run build` before building
# Once you go 'production' deployed, make sure to NEXTAUTH_URL and AUTH_TRUST_HOST
server {
server_name sub.example.com;
# no index file required
root /var/www/NEXTJS_ROOT;
# Serve static assets. Adjust cache as needed
@zacharytyhacz
zacharytyhacz / react-native-checkbox.tsx
Last active December 5, 2024 17:25
React Native Checkbox
import React, { useMemo } from 'react'
import { Svg, Path } from 'react-native-svg'
import { View, StyleSheet, Text, TouchableOpacity, PixelRatio, StyleProp, ViewStyle } from 'react-native';
type Props = {
checked: boolean
onChange: (checked: boolean) => void
label: string
disabled?: boolean
}
@zacharytyhacz
zacharytyhacz / all_cars.csv
Last active April 18, 2022 01:05
All vehicle makes+models+engines since 1943
We can't make this file beautiful and searchable because it's too large.
year,make,model,engine,code
1942,Buick,Century Series 60,5.2L 5248CC L8 Carb, 1486183
1942,Buick,Limited Series 90,5.2L 5248CC L8 Carb, 1486184
1942,Buick,Roadmaster Series 70,5.2L 5248CC L8 Carb, 1486185
1942,Buick,Special Series 40-A,4.1L 4065CC L8 Carb, 1486186
1942,Buick,Special Series 40-B,4.1L 4065CC L8 Carb, 1575176
1942,Buick,Super Series 50,4.1L 4065CC L8 Carb, 1486187
1942,Cadillac,Series 60,5.3L 5272CC V8 Carb, 1486188
1942,Cadillac,Series 60,5.7L 5671CC V8 Carb, 1486189
@zacharytyhacz
zacharytyhacz / .vimrc
Last active May 30, 2022 01:51
my vimrc
"filetype plugin indent on
set background=dark
syntax on
set encoding=utf-8
set nocompatible
" put swap files here
set directory^=$HOME/.vim/tmp//