Skip to content

Instantly share code, notes, and snippets.

View yasu-s's full-sized avatar

Yasuyuki Saito yasu-s

View GitHub Profile
@yasu-s
yasu-s / sample.ts
Last active August 25, 2023 13:08
510課題
export default class Repository<E> {
user: User;
entityClass: ObjectType<E>;
entityManager: EntityManager;
constructor(user: User, entityClass: ObjectType<E>) {
this.user = user;
this.entityClass = entityClass;
this.entityManager = getManager();
}
@yasu-s
yasu-s / manifest.json
Last active February 23, 2024 05:41
Chrome拡張 - ScreenCapture Test
{
"manifest_version": 3,
"name": "ScreenCapture Test",
"version": "1.0",
"description": "ScreenCapture Test",
"permissions": ["activeTab", "debugger"],
"action": {
"default_popup": "popup.html"
}
}
@yasu-s
yasu-s / hoge.ts
Created May 30, 2018 12:02
貼り付けサンプル
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
// #region fields
@yasu-s
yasu-s / todo.md
Last active February 15, 2017 09:54
todo

v1.0.0

  • JSDoc整備
  • md充実
  • 複数プロパティバリデータ
  • Map To Property 実装
  • Map To Property 時にプロパティ名をデコレーター指定対応
  • (AutoMapper暗黙変換(XxxToString, StringToNumber))

v1.1.0

@yasu-s
yasu-s / LinqSample.cs
Last active January 23, 2017 11:58
LINQ使用時・未使用時のロジック比較サンプル
/// <summary>
/// Anyサンプル
/// </summary>
private void Any()
{
var arr = new int[] { 1, 5, 3, 8, 9 };
bool result = false;
// LINQなし:配列に7を超える数値があればTrue
foreach (var num in arr)
@yasu-s
yasu-s / list.html
Created November 24, 2016 14:36
list-groupにscrollbar追加
<div class="container-fluid" style="height: 100vh;">
<div class="row" style="height: 10%; background-color: yellow;">
10
</div>
<div class="row" style="height: 80%; background-color: greenyellow;">
<ul class="list-group" style="max-height: 100%; overflow-y:scroll; ">
<li class="list-group-item">item1</li>
<li class="list-group-item">item2</li>
<li class="list-group-item">item3</li>
<li class="list-group-item">item4</li>
@yasu-s
yasu-s / column_hidden.html
Created November 24, 2016 14:17
Bootstrapで横幅によりグリッドを消す
<div class="container-fluid" style="height: 100vh;">
<div class="row" style="height: 100%;">
<div class="col-xs-6 col-md-4" style="height: 100%; background-color: yellow;">
.col-xs-6 .col-md-4
</div>
<div class="col-xs-6 col-md-4" style="height: 100%; background-color: greenyellow;">
.col-xs-6 .col-md-4
</div>
<div class="hidden-xs hidden-sm col-md-4" style="height: 100%; background-color: aqua;">
.hidden-xs .hidden-sm .col-md-4
@yasu-s
yasu-s / height_stretch.html
Created November 24, 2016 14:03
bootstrapのグリッドで縦幅をストレッチ
<div class="container-fluid" style="height: 100vh;">
<div class="row" style="height: 100%;">
<div class="col-xs-6 col-md-4" style="height: 100%; background-color: yellow;">
.col-xs-6 .col-md-4
</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
<div class="col-xs-6 col-md-4">
.col-xs-6 .col-md-4
</div>
</div>
@yasu-s
yasu-s / settings.json
Last active December 15, 2016 15:13
VisualStudioCode Setting
// Place your settings in this file to overwrite the default settings
{
// エディター
// 1 つのタブに相当するスペースの数。`editor.detectIndentation` がオンの場合、この設定はファイル コンテンツに基づいて上書きされます。
"editor.tabSize": 4,
// 垂直ルーラーを表示する列
"editor.rulers": [120],
// ファイルを開くと、そのファイルの内容に基づいて `editor.tabSize` と `editor.insertSpaces` が検出されます。
"editor.detectIndentation": false,
// Ctrl キーを押しながらマウス ホイールを使用してエディターのフォントをズームします
@yasu-s
yasu-s / WaitActiveTasks.cs
Created February 18, 2016 12:46
アクティブなタスクを完了まで待つ処理
/// <summary>
/// ActiveTask完了まで待つ処理
/// async void されてしまったTaskの完了を待つ
/// </summary>
public static void WaitActiveTasks()
{
var m = typeof(Task).GetMethod("GetActiveTasks", BindingFlags.NonPublic | BindingFlags.Static);
while (true)
{