Skip to content

Instantly share code, notes, and snippets.

Yoriki Yamaguchi y13i

View GitHub Profile
@y13i
y13i / README.md
Last active Apr 21, 2019
ECS SoftEther VPN Server
View README.md
@y13i
y13i / file1.txt
Last active Dec 26, 2018
Cursor-based Pagination な API を RxJS でリアクティブに処理してみる ref: https://qiita.com/y13i/items/1fdd33a49bce80712fe8
View file1.txt
await listObjectsAsObservable(s3, {
Bucket: bucket,
Prefix: prefix,
MaxKeys: 50
})
.pipe(
tap(listObjectsResult => {
console.log(
`!!! 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.");
process.exit(1);
}
@y13i
y13i / Dockerfile
Created May 15, 2018
Ruby on Rails on Docker & Alpine Linux
View Dockerfile
FROM ruby:2.5-alpine
RUN mkdir /app
WORKDIR /app
RUN \
set -x \
&& apk upgrade --no-cache \
&& apk add --no-cache --virtual \
build-dependencies \
&& apk add --no-cache \
@y13i
y13i / push_to_ecr.sh
Last active Jun 15, 2018
AWS ECR にイメージを push する方法をいつも忘れるのでメモ
View push_to_ecr.sh
export AWS_ACCOUNT_ID=nnnn
export AWS_REGION=xxxx
export CONTAINER_REPOSITORY=xxxx
export CONTAINER_IMAGE_TAG=0.0.x
# 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
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
Parameters:
PrivateToInternetAccess:
Type: String
Description: If true, NAT Gateways and Elastic IPs will be created for the internet access from private subnets.
AllowedValues:
- "false"
- "true"
Default: "false"
CidrPrefix:
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;
View keybaseProof.md

Keybase proof

I hereby claim:

  • I am y13i on github.
  • I am y13i (https://keybase.io/y13i) on keybase.
  • I have a public key ASDR5sIp2Jh5hZX7eX5vcB9JVJuDf4srT-hTM15YXw1buwo

To claim this, I am signing this object:

@y13i
y13i / passgen.js
Last active Dec 11, 2017
generate password
View passgen.js
new Array(20).fill(undefined).map(() => {const chars = 'qwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*()-_=+[{]};:/?'.split(''); return chars[Math.floor(Math.random() * chars.length)]}).join('');
@y13i
y13i / .angular-cli.json
Last active Dec 8, 2017
AWS Lambda で Angular アプリを Server Side Rendering してみる ref: https://qiita.com/y13i/items/9401f8aeab096a727417
View .angular-cli.json
// ...
"apps": [
{
"platform": "browser",
"root": "src",
"outDir": "dist/browser",
// ...
{
"platform": "server",
"root": "src",
You can’t perform that action at this time.