Skip to content

Instantly share code, notes, and snippets.

View 継承.ts
abstract class BaseCommand<T> {
abstract parse(argv: string): T;
abstract run(config: T): void;
}
// parse と run の実装とインタフェースを矯正させる
class CommandA extends BaseCommand<{}> {
parse(argv: string) {
return {}
}
View 49.212.217.137.txt
$ wc -l access.log*
71 access.log
40827 access.log.2017-01-28
96341 access.log.2017-02-07
48355 access.log.2017-02-14
37780 access.log.2017-02-21
42383 access.log.2017-02-28
35684 access.log.2017-03-07
34110 access.log.2017-03-14
32159 access.log.2017-03-21
View gist:9b9528829e9e0ac1a893293046f4ed6c
curl https://blog.odan.dev/ --head -H "via: 1.1 0af4f461b5a89684a06050bc1aca8c04.cloudfront.net (CloudFront), 1.1 0af4f461b5a89684a06050bc1aca8c04.cloudfront.net (CloudFront)"
View cal_offset.cpp
#include<cstdio>
typedef unsigned long long UInt64;
typedef unsigned int UInt32;
UInt64 seed1 = 0xC6942472D331BF96;
UInt64 LCGseed;
int offset;
@odanado
odanado / perl.ipynb
Last active Mar 13, 2020
perl.ipynb
View perl.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View promise-wakaran.ts
function taskA(i: number) {
return new Promise<number>((resolve, reject) => {
if (i % 2 == 0) reject(`error on taskA ${i}`)
resolve(i)
})
}
function taskB(i: number) {
return new Promise<number>((resolve, reject) => {
if (i % 3 == 0) reject(`error on taskB ${i}`)
resolve(i)
View poyo.md
cd sandbox
ls
cd sandbox
ls
View create.sql
CREATE TABLE submissions (
id BIGINT NOT NULL,
epoch_second BIGINT NOT NULL,
problem_id VARCHAR(255) NOT NULL,
contest_id VARCHAR(255) NOT NULL,
user_id BIGINT NOT NULL, -- 数値化
language VARCHAR(255) NOT NULL,
point DOUBLE PRECISION NOT NULL,
length INT NOT NULL,
result VARCHAR(255) NOT NULL,
View Scatter3d.vue
<template>
<div ref="stage"></div>
</template>
<script>
import * as THREE from 'three';
import Stats from 'stats.js';
import DataPoint from '@/lib/DataPoint';
import Axis from '@/lib/Axis';