Skip to content

Instantly share code, notes, and snippets.

Yoriki Yamaguchi y13i

Block or report user

Report or block y13i

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ssm-ssh-test.cfn.json
"Parameters": {
"VpcCidr": {
"Description": "VPC network range.",
"Type": "String",
"Default": "",
"AllowedPattern": "^(10\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|172\\.(1[6-9]|2[0-9]|3[01])|192\\.168)\\.0\\.0/(1[6-9]|2[0-8])$"
"SubnetCidrBits": {
"Type": "Number",
View textpand.js
// todo: use
function rnorm() {
return (
Math.sqrt(-2 * Math.log(1 - Math.random())) *
Math.cos(2 * Math.PI * Math.random())
function textpand(text, length = text.length, sd = 0) {
y13i /
Last active Apr 21, 2019
ECS SoftEther VPN Server
y13i / file1.txt
Last active Dec 26, 2018
Cursor-based Pagination な API を RxJS でリアクティブに処理してみる ref:
View file1.txt
await listObjectsAsObservable(s3, {
Bucket: bucket,
Prefix: prefix,
MaxKeys: 50
tap(listObjectsResult => {
`!!! list contains ${listObjectsResult.Contents!.length} items.`
View deployStack.js
const { config, STS } = require("aws-sdk");
const { execSync } = require("child_process");
const sts = new STS();
if (!config.region) {
console.log("Set `$AWS_REGION` environment variable.");
y13i / Dockerfile
Created May 15, 2018
Ruby on Rails on Docker & Alpine Linux
View Dockerfile
FROM ruby:2.5-alpine
RUN mkdir /app
set -x \
&& apk upgrade --no-cache \
&& apk add --no-cache --virtual \
build-dependencies \
&& apk add --no-cache \
y13i /
Last active Jul 9, 2019
AWS ECR にイメージを push する方法をいつも忘れるのでメモ
export AWS_ACCOUNT_ID=nnnn
export AWS_REGION=xxxx
# Docker login to ECR
$(aws ecr get-login --no-include-email) # bash, zsh
# eval (aws ecr get-login --no-include-email) # fish
# build, tag, and push docker image
y13i / generic_aws_network.yml
Last active Sep 26, 2018
Generic AWS VPC Networking Template
View generic_aws_network.yml
Description: Generic AWS VPC Networking
Type: String
Description: If true, NAT Gateways and Elastic IPs will be created for the internet access from private subnets.
- "false"
- "true"
Default: "false"
View vue-typescript-workaround.ts
// workaround: when webpack resolve.alias not working
import * as VueAll from "vue";
import VueDefault from "vue";
export type Vue = VueDefault;
export const Vue = <typeof VueDefault><any>VueAll;
import * as VueRouterAll from "vue-router";
import VueRouterDefault from "vue-router";
export type Router = VueRouterDefault;

Keybase proof

I hereby claim:

  • I am y13i on github.
  • I am y13i ( on keybase.
  • I have a public key ASDR5sIp2Jh5hZX7eX5vcB9JVJuDf4srT-hTM15YXw1buwo

To claim this, I am signing this object:

You can’t perform that action at this time.