Skip to content

Instantly share code, notes, and snippets.

View thedevdavid's full-sized avatar

David thedevdavid

View GitHub Profile
thedevdavid / formfield.tsx
Created September 4, 2023 16:42
@shadcn/ui custom remote
render={({ field }) => (
<FormLabel>Work from...</FormLabel>
<RadioGroup onValueChange={field.onChange} defaultValue={field.value} className="flex flex-wrap">
<FormItem className="flex space-x-1 space-y-1">
"Use Client": {
"prefix": ["uc", "useclient"],
"body": ["\"use client\";"],
"description": "Inserts use client statement"
thedevdavid /
Created July 26, 2023 09:43
WWC Supabase DB Gen


Create a database. Create a habits table with an id, a habit name, an isCompletedToday flag, a userID foreign key relation, a color property, and a start_date. Create another table called users with userID, email. I need a third table for logging habit completions. Related to a habit ID, a completion date.


-- Create a users table
create table users (
 user_id uuid primary key default uuid_generate_v4(),
thedevdavid /
Created July 5, 2023 18:39
Code of Conduct for my projects

Contributor Covenant Code of Conduct

Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

thedevdavid / .zshrc
Last active December 16, 2020 15:51
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
thedevdavid / next.config.js
Created October 5, 2020 12:24
Preact Next config
const withPlugins = require('next-compose-plugins');
const withPrefresh = require('@prefresh/next');
const nextImg = require('next-img/plugin');
const plugins = [
persistentCache: false,
jpeg: {
### Keybase proof
I hereby claim:
* I am dlevai94 on github.
* I am davidlevai ( on keybase.
* I have a public key ASAOdV3xUbOJPm2SsdSixNjloFsfFPQMbATUD0orpJh-Fgo
To claim this, I am signing this object:
thedevdavid / App.js
Created February 26, 2018 12:59
Final App.js
import React, { Component } from 'react';
import {
} from 'react-native';
import firebase from 'react-native-firebase';
thedevdavid / auth.js
Created February 26, 2018 10:48
Auth reducer
import types from '../actions/types';
const initialState = {
loggedIn: false,
isFetching: false,
hasError: false,
errorMessage: '',
user: null
thedevdavid / index.js
Created February 26, 2018 10:40
import React from 'react';
import { AppRegistry, Text } from 'react-native';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
import configureStore from './src/config/store';
import App from './App';
const { store, persistor } = configureStore();