Skip to content

Instantly share code, notes, and snippets.

Avatar

Kouji Nakashima kuc-arc-f

View GitHub Profile
@kuc-arc-f
kuc-arc-f / app.js
Created Jan 16, 2022
Serverless Framework + express, deploy sample
View app.js
const serverless = require('serverless-http');
const express = require('express');
const indexRouter = require('./routes/index');
const usersRouter = require('./routes/users');
const app = express();
app.use('/', indexRouter);
app.use('/users',usersRouter);
//module.exports = app;
@kuc-arc-f
kuc-arc-f / xls6.tsx
Created Jan 15, 2022
React + ExcelJS, XLS templete read, sample
View xls6.tsx
/* XLS templete, read */
import React from 'react'
const ExcelJS = require('exceljs');
import axios from 'axios'
interface IProps {
history:string[],
}
//
class Test extends React.Component<IProps> {
@kuc-arc-f
kuc-arc-f / xls2.tsx
Created Jan 14, 2022
Excel(exceljs) sample, react 17
View xls2.tsx
/* jsPdf , japan lang sample */
import React from 'react'
const ExcelJS = require('exceljs');
interface IProps {
history:string[],
}
//
class Test extends React.Component<IProps> {
constructor(props: any) {
@kuc-arc-f
kuc-arc-f / serverless.yml
Last active Jan 13, 2022
serverless.yml, Serverless Framework local sample
View serverless.yml
service: service2
custom:
dynamodb:
stages:
- dev
start:
port: 8000
inMemory: true
migrate: true
@kuc-arc-f
kuc-arc-f / serverless.yml
Created Jan 13, 2022
serverless.yml, Serverless Framework test sample
View serverless.yml
service: service1
#frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
region: ap-northeast-1
stage: dev
@kuc-arc-f
kuc-arc-f / [id].tsx
Created Jan 7, 2022
pdf print css add , next.js
View [id].tsx
import Head from 'next/head'
import React from 'react'
import Link from 'next/link';
import marked from 'marked'
import Layout from '../../components/layout'
import LibCommon from '../../libs/LibCommon'
import LibCms from '../../libs/LibCms'
//
@kuc-arc-f
kuc-arc-f / pdf11.tsx
Created Jan 5, 2022
jsPdf + chart.js + html2canvas sample
View pdf11.tsx
/* jsPdf + chart.js + html2canvas sample */
import React from 'react'
import {
Chart as ChartJS,
CategoryScale,
LinearScale,
PointElement,
LineElement,
Title,
@kuc-arc-f
kuc-arc-f / TableBox1.tsx
Last active Jan 5, 2022
jsPdf + html2canvas , addPage sample
View TableBox1.tsx
import * as React from 'react';
export default function TableBox1() {
return (
<div>
<h3>テーブル サンプル</h3>
<hr className="my-2" />
<table className="table table-hover">
<thead>
<tr>
@kuc-arc-f
kuc-arc-f / pdf9.tsx
Last active Jan 5, 2022
jsPdf , html2canvas japan lang
View pdf9.tsx
/* jsPdf , html2canvas japan lang */
import React from 'react'
const { jsPDF } = require("jspdf");
import html2canvas from 'html2canvas';
interface IProps {
history:string[],
}
//
class Test extends React.Component<IProps> {
@kuc-arc-f
kuc-arc-f / pdf6.tsx
Created Jan 4, 2022
jsPdf , japan lang sample
View pdf6.tsx
/* jsPdf , japan lang sample */
import React from 'react'
const { jsPDF } = require("jspdf");
import {myFont} from '../../lib/mplus'
interface IProps {
history:string[],
}
//
class Test extends React.Component<IProps> {