Skip to content

Instantly share code, notes, and snippets.

View tetsuharuohzeki's full-sized avatar

Tetsuharu Ohzeki tetsuharuohzeki

  • Tokyo, Japan
  • 00:38 (UTC +09:00)
View GitHub Profile
@tetsuharuohzeki
tetsuharuohzeki / init_labels.js
Created March 6, 2019 08:35
Setup GitHub labels
'use strict';
const Octokit = require('@octokit/rest')
const clientWithAuth = new Octokit({
auth: 'token <blahblahblah>'
});
class LabelDef {
constructor(name, color, description) {
this.name = name;
@tetsuharuohzeki
tetsuharuohzeki / rx_for_js_matomme.md
Last active August 4, 2018 06:46
RxJSのいろいろ雑感(2015年8月末編)

RxJSのいろいろ雑感(2015年8月末編)

  • Rx for JavaScriptについて、色々触った結論としてはこんな感じ
    • あくまでも現時点の感想なんで、そのうち認識が変わるかも
  • JavaScriptでRxを使う人ターゲットなんで、他の言語portにも効く話かはわからない

総論

気をつけること

@tetsuharuohzeki
tetsuharuohzeki / result.md
Last active September 21, 2016 10:25
Results of WebKit's /PerformanceTests/ES6SampleBench/index.html Sept. 21th, 2016
@tetsuharuohzeki
tetsuharuohzeki / ExIterable.ts
Last active June 25, 2016 08:19
Extentions for ECMA262 6th iterator
/**
* This provides extensions for ECMA262 2015's iterator.
*
* This adds `map()`, `forEach()`, `filter()`, `flatMap()`, or others
* to `Iterable<T>`. This enables features looks like "lazy evaluation".
* The design refers RxJS v5's one.
*
* See example:
* ```
*
@tetsuharuohzeki
tetsuharuohzeki / Result.ts
Last active March 7, 2016 05:44
Result<T, E> in TypeScript
/**
* This type is based on https://doc.rust-lang.org/std/result/enum.Result.html
*/
import {Option, Some, None} from 'option-t';
type mapFn<T, U> = (v: T) => U;
type flatmapOkFn<T, U, E> = (v: T) => Result<U, E>;
type flatmapErrFn<T, E, F> = (e: E) => Result<T, F>;
type recoveryFn<E, T> = (e: E) => T;
/* vim: set filetype=typescript shiftwidth=4 tabstop=4 expandtab: */
/*
* @license MIT License
*
* Copyright (c) 2014 Tetsuharu OHZEKI <saneyuki.snyk@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@tetsuharuohzeki
tetsuharuohzeki / observer.js
Last active January 4, 2016 12:29
Performance benchmark for observer-js
/* vim: set filetype=javascript shiftwidth=4 tabstop=4 expandtab: */
/*
* @repository
* https://github.com/saneyuki/observer-js
* @version
* 0.2.0
* @license
* BSD 2-Clause License.
*
* Copyright (c) 2014, Tetsuharu OHZEKI <saneyuki.snyk@gmail.com>
@tetsuharuohzeki
tetsuharuohzeki / bootstrap.js
Last active December 30, 2015 05:09
Spatial Navigation Igniter
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
* The Original Code is mozilla.org code (Firefox 23)
* The Initial Developer of the Original Code is mozilla.org.
*/
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
@tetsuharuohzeki
tetsuharuohzeki / servo.opml
Last active December 18, 2015 14:19
mozilla/servoとmozilla-servoの全リポジトリのfeed
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>servo</title>
</head>
<body>
<outline title="mozilla-servo" text="mozilla-servo">
<outline text="mozilla-servo/cairo"
title="mozilla-servo/cairo" type="rss"
xmlUrl="https://github.com/mozilla-servo/cairo/commits/master.atom" htmlUrl="https://github.com/mozilla-servo/cairo/commits/master"/>