Skip to content

Instantly share code, notes, and snippets.

View hassaku63's full-sized avatar

Takuya Hashimoto hassaku63

View GitHub Profile
@hassaku63
hassaku63 / death_march.md
Created April 12, 2025 05:43 — forked from voluntas/death_march.md
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

@hassaku63
hassaku63 / stack.ts
Created April 9, 2025 02:26
Enable GuardDuty Runtime Monitoring for ECS Fargate
import * as cdk from 'aws-cdk-lib';
import * as ecs from 'aws-cdk-lib/aws-ecs';
import * as ecr from 'aws-cdk-lib/aws-ecr';
import * as iam from 'aws-cdk-lib/aws-iam';
import { Construct } from 'constructs';
interface MyStackProps extends cdk.StackProps {}
export class MyStack extends cdk.Stack {
constructor(scope: Construct, id: string, props: MyStackProps) {
@hassaku63
hassaku63 / .cursorrules
Created March 6, 2025 10:49
example cursorrules (general coding guidance)
## 重要事項
`git status` を使って、現在開いているワークスペースが git で管理されているかどうか確認します。現在の git コンテキストを確認し、もし指示された内容と無関係な変更が多い場合は、現在の変更からユーザーに別のタスクとして開始するように提案をしてください。ユーザーが無視してよいと指示した場合はそのまま続行します。
## セキュリティ
ファイル名に次の規則を持つものは、参照しないでください。
@hassaku63
hassaku63 / assume-role-helper.sh
Last active December 24, 2024 15:39
Shell helper function for AWS STS AssumeRole
#!/bin/zsh
# Check if jq is installed
function check_jq() {
if ! command -v jq &> /dev/null; then
echo "Error: jq is not installed. Please install jq to use this script."
return 1
fi
}
@hassaku63
hassaku63 / dotenv-to-json.sh
Created September 25, 2024 10:37
Expand dotenv to JSON array of name/value object (like ECS task-def)
# blog(jp): https://zenn.dev/hassaku63/articles/b026266e5a82b4
alias jq-dotenv="jq -R 'split(\"\n\") | map(split(\"=\")) | flatten | {\"name\": .[0], \"value\": .[1]}'"
function dotenv-to-json () {
filename=$1
grep -v '^\s*#' ${filename} |grep -v '^\s*$' | \
jq -R 'split("\n") | map(split("=")) | flatten | {"name": .[0], "value": .[1]}'
}
@hassaku63
hassaku63 / app.ts
Last active September 17, 2024 08:13
CDK app example impl. (set RemovalPolicy = "DELETE" if performing deployment to 'dev' stage)
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import { IConstruct } from 'constructs';
import { MyStack } from '../lib/my-stack';
const app = new cdk.App();
const availableStages = ['dev', 'stg', 'prod'] as const;
type Stage = typeof availableStages[number];
@hassaku63
hassaku63 / commands.template
Last active January 26, 2025 21:31
simple python string.Template example
aws ecr get-login-password --region ${aws_region} | docker login --username AWS --password-stdin ${aws_account_id}.dkr.ecr.$aws_region.amazonaws.com
docker build -t ${image_name} .
docker tag ${image_name}:$image_tag ${aws_account_id}.dkr.ecr.$aws_region.amazonaws.com/${image_name}:$image_tag
docker push ${aws_account_id}.dkr.ecr.${aws_region}.amazonaws.com/${image_name}:$image_tag
@hassaku63
hassaku63 / 0512-iam-oidc-provider-l2-use-native-cfn-resource.md
Created July 22, 2024 20:32
AWS CDK aws-cdk-rfcs issue#512 に関する書きかけ RFC の供養

IAM OIDC Provider L2 Construct: use CfnOIDCProvider

  • Original Author(s):: @hassaku63
  • Tracking Issue: #512
  • API Bar Raiser: -

Allow the OpenIdConnectProvider construct to internally use the native CloudFormation Resource AWS::IAM::OIDCProvider.

Working Backwards

@hassaku63
hassaku63 / codepipeline-start-pipeline-execution-sampe.ts
Created June 19, 2023 12:35
AWS SDK for Node.js (v3) で CodePipeline StartPipelineExecution API を実行するサンプル
import {
CodePipelineClient,
StartPipelineExecutionCommand,
StartPipelineExecutionCommandOutput,
ConflictException,
} from "@aws-sdk/client-codepipeline";
type StartPipelineExecutionResultFailed = {
success: false,
error: Error,
@hassaku63
hassaku63 / SECCON Beginners CTF 2023.md
Last active June 4, 2023 05:29
SECCON Beginners CTF 2023

URL: https://score.beginners.seccon.jp/

今回 CTF 初挑戦だったので、やってたこと、考えてたことなどを雑にメモっていく場所。

マジで何もわかっていないで書いてるので、(これを見てしまった人向けに)正解にたどり着きたい人、参考情報を得たい人が見るような「資料」じゃないことを予め断っておく。

自分が何考えてたのかをある程度 dump したものであって、バックグラウンドを理解して書いてるものではない。

競技日程