Skip to content

Instantly share code, notes, and snippets.

View tacck's full-sized avatar

Kihara, Takuya tacck

View GitHub Profile
@tacck
tacck / BaseStack.ts
Created June 15, 2023 03:05
AWS CDK sample for Athena settings
////////// Athena //////////
const dataCatalogAggregate = new athena.CfnDataCatalog(
scope,
"dataCatalogAggregate",
{
name: "dataCatalogAggregate",
type: "GLUE",
parameters: {
"catalog-id": accountId,
@tacck
tacck / BaseStack.ts
Created June 8, 2023 03:08
AWS CDK sample for Post to Slack in Step Functions using API Gateway
import { PostSlackApiGwStack } from "./PostSlackApiGwStack";
...
const postSlackGwStack = new PostSlackGwStack(scope, id, props);
const postSlackGateway = postSlackGwStack.getApiGateway();
const SLACK_APP_TOKEN = "xoxb-XXXXXXXXXX";
@tacck
tacck / index.md
Last active October 10, 2022 11:12
Vite + React + TypeScript + ESLint + Prettier on AWS Cloud9

Vite + React + TypeScript + ESLint + Prettier on AWS Cloud9

crate project

npm create vite@latest sample-app -- --template react-ts 
cd sample-app

install packages

eslit

@tacck
tacck / Don't check TLS certification on Node.js
Last active August 27, 2021 01:35
Don't check TLS certification on Node.js
NODE_TLS_REJECT_UNAUTHORIZED=0
@tacck
tacck / FileListForGoogleShareDrive.js
Last active December 5, 2024 15:58
Show file list in Google Share Drive's folder. base on https://developers.google.com/drive/api/v3/quickstart/nodejs
'use strict'
if (process.argv.length != 4) {
console.log(`Usage: ${process.argv[1]} [Share Drive ID] [Parent Folder ID]`)
return 1
}
const shareDriveId = process.argv[2]
const parentFolderId = process.argv[3]
@tacck
tacck / index.js
Created October 18, 2019 05:38
Rewrite on Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const regex = /.*\/$/;
const result = request.uri.match(regex);
if (result !== null) {
request.uri += 'index.html';
location /lua_return_404 {
set $body "";
rewrite_by_lua '
ngx.exit(404)
';
header_filter_by_lua_block {
local body = "{ \"http_host\": \"" .. ngx.var.http_host .. "\" }"
ngx.var.body = body
local body_length = string.len(body)
@tacck
tacck / file0.txt
Created March 15, 2014 13:21
Vagrant内のCentOS 6.5にGitLab Omnibusをインストールしてみた話 ref: http://qiita.com/tacck/items/d025f02e1db656a6fc66
config.vm.network "forwarded_port", guest: 80, host: 8000
@tacck
tacck / file0.txt
Created December 29, 2013 13:58
Vagrant内のCentOS6.5にてDockerのWebUIであるShipyardを使ってみる ref: http://qiita.com/tacck/items/4a2c8b306148665cbb45
other_args="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock"
@tacck
tacck / CodeSampleData.java
Created October 13, 2013 03:53
AndroidでSQLiteはどこまで書くものか ref: http://qiita.com/tacck/items/6ef046cbbf1d848cfeea
public class CodeSampleData extends SampleData {
public static final String CREATE_TABLE = ""
+ "create table " + TABLE_NAME + " ( "
+ FIELD_ID + " integer primary key autoincrement "
+ ", " + FIELD_VALUE_INT + " integer "
+ ", " + FIELD_VALUE_LONG + " integer "
+ ", " + FIELD_VALUE_BOOL + " integer "
+ ", " + FIELD_VALUE_STRING_8 + " text "
+ ", " + FIELD_VALUE_STRING_100 + " text "
+ ", " + FIELD_VALUE_STRING_1000 + " text "