Skip to content

Instantly share code, notes, and snippets.

View EyalPerry's full-sized avatar
😃
Great

Eyal Perry EyalPerry

😃
Great
View GitHub Profile
@EyalPerry
EyalPerry / cdk.ts
Last active March 17, 2021 12:31
Indexing S3 Images Atomically
import * as cdk from "@aws-cdk/core";
import * as lambda from "@aws-cdk/aws-lambda";
import * as iam from "@aws-cdk/aws-iam";
import * as sqs from "@aws-cdk/aws-sqs";
import * as s3n from "@aws-cdk/aws-s3-notifications";
import * as s3 from "@aws-cdk/aws-s3";
const queue = new sqs.Queue();
const fn = new lambda.Function();
const bucket = new s3.Bucket();
function MyDiv(props: any){
return <div>hi!</div>;
}
function Wrapper(props: any) {
const {Wrapped, ...wrappedProps} = props;
return <div><Wrapped {...wrappedProps} /></div>
}
<Wrapper Wrapped={MyDiv} className="so-hot" />
@EyalPerry
EyalPerry / app.jsx
Last active June 27, 2020 08:11
microfrontend
import React {useState, useEffect} from 'react';
import {Switch, Route} from 'react-router-dom';
function Frontend({manifest}){
return <iframe src={manifest.url} />
}
function App() {
const [manifest, setManifest] = useState();
@EyalPerry
EyalPerry / ThemeSchema.ts
Created March 24, 2020 17:40
Component Colors
export interface ColorSchemes
{
light: ComponentPalletes:
dark: ComponentPalletes;
}
export interface ComponentPalletes
{
button: ButtonPalletes;
...