Skip to content

Instantly share code, notes, and snippets.

View alettieri's full-sized avatar
💭
thinking

Antonio Essex-Lettieri alettieri

💭
thinking
View GitHub Profile
@alettieri
alettieri / PlanItemChart.tsx
Last active March 7, 2024 17:53
Recharts Tooltip on Points
import React from 'react';
import { Typography, useTheme, Box, Theme, SxProps } from '@mui/material';
import { LineChart, Line, Legend, Tooltip, TooltipProps } from 'recharts';
import { LinePointItem } from 'recharts/types/cartesian/Line';
// Leaving out some imports for brevity...
import {
PlanItem,
PlanItemGroup,
@alettieri
alettieri / Component.tsx
Last active October 12, 2023 16:44
HubSpot React/Next Scheduler Widget Component
import { useHubSpotMeetingsSchedulerListener } from '../lib/HubSpot/useHubSpotMeetingsSchedulerListener';
const Component = () => {
useHubSpotMeetingsSchedulerListener({
onMeetingBookedSuccess(event) {
console.log('success!', event);
},
});
@alettieri
alettieri / DropZone.tsx
Created July 6, 2023 18:01
React DropZone validation logic
import React from 'react';
import { Box, Input } from '@mui/material';
import { clsx } from 'clsx';
import { useDropzone, DropzoneOptions } from 'react-dropzone';
import { DropZoneProvider } from './DropZoneProvider';
type IDropZoneProps = DropzoneOptions & {
children: React.ReactNode;
@alettieri
alettieri / ResponsiveChartContainer.tsx
Created March 10, 2023 03:28
Recharts Responsive Container Solution
import React from 'react';
import { Box } from '@mui/material';
import { useElementDimensions } from '../../hooks/useElementDimensions';
const ResponsiveChartContainer = ({
children,
}: {
children: React.ReactElement;
@alettieri
alettieri / proxy-server.js
Created March 29, 2017 19:36
HouseCanary api node proxy
// Request npm module - https://www.npmjs.com/package/request
const request = require('request');
const http = require('http');
const parse = require('url').parse;
// ===
// API Authentication
// Get test keys from: https://valuereport.housecanary.com/settings/api-settings
// ===
const API_KEY = '<REPLACE_WITH_API_KEY>';
@alettieri
alettieri / list.html
Created February 3, 2017 22:10
polymer-list
<dom-module id="my-view1">
<template>
<template is="dom-repeat" items="{{fixedList(hcValue)}}" as="item">
<p>TEST:[[item.address_info.address]]</p>
<p>TEST:[[item.address_info.state]]</p>
<p>TEST:[[item.property_value.result.value.price_mean]]</p>
</template>
</template>
<script>
Polymer({
@alettieri
alettieri / lists
Last active August 29, 2015 14:17
angular.callbacks._0([{"date":"Monday, March 16, 2015","time":"5:00am-6:00am","title":"Aqua Aerobics","studio":"Please note time change","category":"Aquatics","instructor":"John Fable","original_instructor":"John Fable","sub_instructor":"","length":"60","location":"All","id":"59506"},{"date":"Monday, March 16, 2015","time":"7:00am-8:00am","title":"Balletone","studio":"GX2","category":"Cardio","instructor":"Shannon Fable","original_instructor":"Shannon Fable","sub_instructor":"","length":"60","location":"All","id":"59513"},{"date":"Monday, March 16, 2015","time":"7:00am-8:00am","title":"Booty Blaster","studio":"","category":"Cardio","instructor":"Sara Allen","original_instructor":"Sara Allen","sub_instructor":"","length":"60","location":"GXP Club - Gray","id":"9143155"},{"date":"Monday, March 16, 2015","time":"7:00am-8:00am","title":"Balletone","studio":"GX2","category":"Cardio","instructor":"Lisa Way","original_instructor":"Lisa Way","sub_instructor":"","length":"60","location":"All","id":"9101321"},{"date":"
@alettieri
alettieri / An-Anonymous-Pen.markdown
Created February 3, 2014 23:35
A Pen by Captain Anonymous.
@alettieri
alettieri / Vagrantfile
Last active February 3, 2021 19:41
Vagrantfile and LAMP provisioning script. This is a set of scripts composed for a WordPress meetup talk. http://www.meetup.com/wordpress-sf/events/144084162/ The vagrantfile will build a lucid32 machine, then kicks off some provision scripts: provision.sh: Install LAMP stack, Ruby, SASS and Compass. apache.sh Updates the default apache config fi…
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@alettieri
alettieri / index.html
Created August 7, 2013 17:12
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;