Skip to content

Instantly share code, notes, and snippets.

View horacioh's full-sized avatar
💪
hustling

Horacio Herrera horacioh

💪
hustling
View GitHub Profile
@horacioh
horacioh / README.md
Last active January 11, 2023 16:38
Simple Typescript package setup

Dead Simple package setup for Typescript

Steps

  1. Initial project folder setup:
mkdir mypackage                   # Create a new folder for your package
cd mypackage
pnpm init # Create a brand new package.json
@horacioh
horacioh / frontend-testing.md
Last active September 1, 2022 21:34
Mintter Frontend testing docs

Frontend Testing

In mintter we have currently 3 types of testing:

  1. Static type testing with Typescript
  2. Unit testing functions with vitest
  3. UI testing with Cypress

Run tests locally

@horacioh
horacioh / machine.js
Created July 30, 2021 14:32
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@horacioh
horacioh / machine.js
Last active July 30, 2021 09:16
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@horacioh
horacioh / Responsive.js
Created July 14, 2021 08:26 — forked from ericvicenti/Responsive.js
React Native Web Responsive Component
import React from 'react';
import { useTheme } from './Theme';
import { View } from '@aven/views';
import CSSProperties from './CSSProperties';
function validateNumberValue(value) {
if (typeof value === 'number') {
return `${value}px`;
} else {
return value;
@horacioh
horacioh / machine.js
Last active July 9, 2021 09:48
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@horacioh
horacioh / machine.js
Created April 4, 2021 09:03
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@horacioh
horacioh / keybase.md
Created March 30, 2020 10:54
Keybase Github prove

Keybase proof

I hereby claim:

  • I am horacioh on github.
  • I am horacioh (https://keybase.io/horacioh) on keybase.
  • I have a public key ASA2rNTwAFRIpL8rqgl_LywhDhWzDNXH_lMUoSN1gkSoRQo

To claim this, I am signing this object:

@horacioh
horacioh / gatsby-config.js
Created November 20, 2019 21:59
Gatsby config: PostCSS, Tailwind, Emotion, Prismic, Google Analytics, Manifest & Offline
/* eslint-disable jsx-a11y/rule-name */
const path = require("path")
require("dotenv").config({
path: `../.env.${process.env.NODE_ENV}`,
})
module.exports = {
siteMetadata: {

I had pushed this schema.graphql:

type Post @model {
  id: ID!
  title: String!
  slug: String!
  content: String!
 createdAt: String!