Skip to content

Instantly share code, notes, and snippets.

View euxn23's full-sized avatar

yuta.suzuki euxn23

View GitHub Profile
@euxn23
euxn23 / tsconfig.json
Last active September 20, 2020 07:43
tsconfig.json
{
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
@euxn23
euxn23 / .envrc.rb
Last active July 19, 2018 15:22
envrc for ruby
PATH_add "$RBENV_ROOT/versions/$(cat .ruby-version)/bin"
PATH_add vendor/bundle/bin
PATH_add bin
// To parse this data:
//
// import { Convert, Coordinate } from "./file";
//
// const coordinate = Convert.toCoordinate(json);
//
// These functions will throw an error if the JSON doesn't
// match the expected interface, even if the JSON is valid.
/**
import { Image } from './image'
import {
IsInt,
IsNotEmpty,
validateSync,
ValidationError
} from 'class-validator'
export class ImageEntity implements Image {
@IsNotEmpty()
@euxn23
euxn23 / 自己紹介.md
Last active March 5, 2021 08:06
自己紹介

自己紹介

鈴木 雄大 (Yuta Suzuki)

  • H4/11/23 ~ (28歳)
  • 茨城県北茨城市出身(現在実家に疎開中)

好き

  • ゲーム
    • ポケモン対戦(最高ランクマッチ3桁位)
  • カードゲーム
@euxn23
euxn23 / logger.ts
Created December 29, 2019 21:44
s3-upload-logger
import AWS from 'aws-sdk';
import Stream from 'stream';
import dayjs from 'dayjs';
const { LOG_BUCKET } = process.env;
if (!LOG_BUCKET) {
throw new Error('$LOG_BUCKET is not defined.');
}
const startedAt = dayjs().format('YYYY-MM-DD-HH-mm-ss');
@euxn23
euxn23 / .prettierrc
Last active September 20, 2020 07:44
.prettierrc
{
"singleQuote": true,
"semi": false
}
@euxn23
euxn23 / handler.ts
Created January 19, 2020 17:32
async reduce
const statuses = await searchParams
.reduce(async (statusesPromise: Promise<Status[]>, searchParam): Promise<
Status[]
> => {
const statuses = await statusesPromise;
const nextStatuses = await searchTweet(
client,
searchParam,
sinceId
).then(ss =>
@euxn23
euxn23 / init.nvim
Created February 19, 2021 09:32
vim neovim&wsl2 compatible clipboard
if has("nvim")
if system('uname -a | grep microsoft') != ''
let g:clipboard = {
\ 'name': 'myClipboard',
\ 'copy': {
\ '+': 'win32yank.exe -i',
\ '*': 'win32yank.exe -i',
\ },
\ 'paste': {
\ '+': 'win32yank.exe -o',
@euxn23
euxn23 / post-checkout
Last active March 5, 2021 10:19
git checkout hook to dehydrate node_modules
#!/usr/bin/env ruby
branch_name = `git symbolic-ref --short HEAD`.chomp
git_dir = `git rev-parse --show-toplevel`.chomp
if branch_name.match /master/
system "mv #{git_dir}/node_modules #{git_dir}/node_modules.feat"
system "mv #{git_dir}/node_modules.master #{git_dir}/node_modules"
puts 'node_modules moved'
elsif branch_name.match /^feature/