Skip to content

Instantly share code, notes, and snippets.

View inoh's full-sized avatar
🏠
Working from home

hiroyuki inoue inoh

🏠
Working from home
View GitHub Profile
Resources:
EC2VpcFFB3EF08:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsHostnames: true
EnableDnsSupport: true
InstanceTenancy: default
Tags:
- Key: Name
Resources:
ServiceLBE9A1ADBC:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
LoadBalancerAttributes:
- Key: deletion_protection.enabled
Value: "false"
Scheme: internet-facing
SecurityGroups:
- Fn::GetAtt:
@inoh
inoh / cdk.py
Last active February 27, 2022 17:46
bucket = s3.Bucket(self,
'S3',
bucket_name='diary.ino-h.com',
website_index_document='index.html',
removal_policy=core.RemovalPolicy.DESTROY,
)
s3_deployment.BucketDeployment(self,
'Deployment',
sources=[s3_deployment.Source.asset('build')],
FROM public.ecr.aws/lambda/python:3.8
ENV PYTHONUNBUFFERED=1
RUN pip install poetry
COPY pyproject.toml poetry.lock ./
RUN poetry export -f requirements.txt > requirements.txt
RUN pip install -r requirements.txt
Resources:
Diaries3B600A46:
Type: AWS::DynamoDB::Table
Properties:
KeySchema:
- AttributeName: id
KeyType: HASH
AttributeDefinitions:
- AttributeName: id
AttributeType: S
import React, { useReducer, useEffect, useState } from 'react';
interface ITable {
id: string;
players: IPlayer[];
}
interface IPlayer {
id: string;
name: string;
## 一覧
- useState
- useEffect
- useCallback
- useReducer
- useMemo
## ドキュメント
https://ja.reactjs.org/docs/hooks-reference.html
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux'
import Hello from '../components/Hello';
class App extends Component {
static propTypes = {
dispatch: PropTypes.func.isRequired,
hellos: PropTypes.arrayOf(PropTypes.shape({
value: PropTypes.string.isRequired,
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, combineReducers } from 'redux'
import { Provider } from 'react-redux'
import App from './containers/App';
// hellosの初期データ
const initalHellos = [{
value: 'よろしく!',
@inoh
inoh / es6-function.md
Last active April 4, 2017 00:35
アローファンクションの引数の話

かっこあり

const App = ({ history }) => (
  <Router history={history}></Router>
);
var App = function App(_ref) {
 var history = _ref.history;