I hereby claim:
- I am shivekkhurana on github.
- I am shivekkhurana (https://keybase.io/shivekkhurana) on keybase.
- I have a public key ASCw6jj06KkkRAoKi5hSHHoUPi7UKferuGf5BiWff96VLAo
To claim this, I am signing this object:
| #!/usr/bin/env bun | |
| import { Command } from "commander"; | |
| import { sql } from "drizzle-orm"; | |
| import { readFileSync } from "fs"; | |
| import { join } from "path"; | |
| import dbFactory from "@src/db/factory"; | |
| import { Bindings } from "@src/domain/hono.types"; | |
| const program = new Command(); | 
| Chat GPT prompt for generating first pass malli schemas: | |
| ``` | |
| I have a set of react components written in ClojureScript. These components form the design system of a react-native application. I want to introduce prop type checking for these components using the Malli Spec Library. | |
| Here's an example of how we spec a component | |
| start-clojure-code--- | |
| (def ?schema | |
| [:=> | |
| [:catn | 
| { | |
| "pubkey": "3fA3QiNEFgZwSxqRnvqAqRmX2P5eUUngCv79ApEdz2Hc", | |
| "info": { | |
| "executable": false, | |
| "owner": { | |
| "_bn": "0b7065b1e3d17c45389d527f6b04c3cd58b86c731aa0fdb549b6d1bc03f82946" | |
| }, | |
| "lamports": 5616720, | |
| "data": { | |
| "type": "Buffer", | 
| { | |
| "name": "Tara Base Card", | |
| "description": "Tara universe is a demo project to showcase the power of Meta Blocks Protocol. This base card is where the story begins.", | |
| "image": "0.png", | |
| "attributes": | |
| [ | |
| { | |
| "trait_type": "texture", | |
| "value": "futuristic" | |
| }, | 
| ;; Reagent component that depends on Ratom | |
| (def counter-state (r/atom 0)) | |
| (defn counter [params] | |
| [:<> | |
| [:div (str params)] | |
| [:div @counter-state] | |
| [:button {:on-click #(swap! counter-state inc)} "Inc"]]) | |
| ;; Wrapper component that will be rendered as React element, will call hooks and pass values from hooks to Reagent component | |
| ;; currently using `useParams` hook from `react-router-dom`, but any hook can be used | 
| async funtion main() { | |
| // call the godown manager and inquire about inventory | |
| const inventory = await getGodownStatus(godownManagerContact); | |
| // get request details (generally from a whatsapp message) | |
| const distributionRequest = await fetchReqestDFetails(); | |
| // an id is needed for our records and we'll only distribute at places where we have strong ground control | |
| const isRequestValid = await beneficieriesHaveAUniqueId(distributionRequest) && await weTrustRequesters(); | 
| #!/bin/sh | |
| set -eu | |
| # Docker | |
| sudo apt remove --yes docker docker-engine docker.io || true | |
| sudo apt update | |
| sudo apt --yes --no-install-recommends install apt-transport-https ca-certificates | |
| wget --quiet --output-document=- https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | 
| import React from 'react'; | |
| import {Route} from 'react-router-dom'; | |
| import PropTypes from 'prop-types'; | |
| import {TransitionMotion, spring} from 'react-motion'; | |
| const FadeRoute = ({component: Component, ...rest }) => { | |
| return (<Route {...rest} children={({location, match}) => ( | |
| <TransitionMotion | |
| willEnter={() => ({opacity: 0})} | |
| willLeave={() => ({opacity: spring(0)})} | 
I hereby claim:
To claim this, I am signing this object:
| export default function keducer(prefix, actionMutationMap={}) { | |
| return (state={}, action) => { | |
| return actionMutationMap[action.type] ? | |
| actionMutationMap[action.type](state, action.payload) : | |
| action.type.indexOf(`${prefix}.`) === 0 ? {…state, …(action.payload)} : state | |
| ; | |
| }; | |
| } |