Skip to content

Instantly share code, notes, and snippets.

View mysticatea's full-sized avatar
🐢
I will be randomly offline.

Toru Nagashima mysticatea

🐢
I will be randomly offline.
  • Shizuoka, Japan
View GitHub Profile
@voluntas
voluntas / open_ayame.rst
Last active February 19, 2024 16:25
OpenAyame プロジェクト

Original minified code:

var Stream=require("stream").Stream;module.exports=function(e,n){var i=new Stream,a=0,o=0,u=!1,f=!1,l=!1,c=0,s=!1,d=(n=n||{}).failures?"failure":"error",m={};function w(r,e){var t=c+1;if(e===t?(void 0!==r&&i.emit.apply(i,["data",r]),c++,t++):m[e]=r,m.hasOwnProperty(t)){var n=m[t];return delete m[t],w(n,t)}a===++o&&(f&&(f=!1,i.emit("drain")),u&&v())}function p(r,e,t){l||(s=!0,r&&!n.failures||w(e,t),r&&i.emit.apply(i,[d,r]),s=!1)}function b(r,t,n){return e.call(null,r,function(r,e){n(r,e,t)})}function v(r){if(u=!0,i.writable=!1,void 0!==r)return w(r,a);a==o&&(i.readable=!1,i.emit("end"),i.destroy())}return i.writable=!0,i.readable=!0,i.write=function(r){if(u)throw new Error("flatmap stream is not writable");s=!1;try{for(var e in r){a++;var t=b(r[e],a,p);if(f=!1===t)break}return!f}catch(r){if(s)throw r;return p(r),!f}},i.end=function(r){u||v(r)},i.destroy=function(){u=l=!0,i.writable=i.readable=f=!1,process.nextTick(function(){i.emit("close")})},i.pause=function(){f=!0},i.resume=fu
@voluntas
voluntas / death_march.md
Last active December 29, 2023 15:36
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

@szktty
szktty / WebRTCBuildGuide.md
Last active April 16, 2023 15:04
詳解 WebRTC ビルド

詳解 WebRTC ビルド

以下の内容は M63 時点の情報です。

WebRTC ライブラリのソースコードはサイズが 6GB 以上あってダウンロード時間でペヤングが 100 個は食べられるほどで、ビルドするにも Mac Pro の 12 コアをフル回転させて 1 つのアーキテクチャにつき最低 15 分はかかります。その上ビルドは相当に複雑な構成をしており、全地球のプログラマの寿命を戦闘機のカタパルトで助走をつけて殴っていいレベルで削らせるブラックなボックスです。あまりに自力ビルドの難易度が高いので WebRTC Build Scripts というビルドスクリプトも登場しましたが、最近ビルド方法が大きく変更されたために残念ながらこのビルドツールの内容は古くなってしまいました。

幸い iOS では公式ビルドのバイナリをダウンロードできるようになりました。 ところが「これで iOS はすべて解決!」とも言えません。 WebRTC のビルドには様々なオプションが用意されており、公式ビルドはあくまで特定のオプションの組み合わせの一つです。残念なことに用途によっては公式ビルドでカバーできない場合もあり、気軽に依存できない状況もあると思います。 時雨堂の WebRTC SFU Sora とかそうです (宣伝)。

この記事の目的は、ビルドの各手順の意味を把握してもらうことです(理解とは言ってない)。おそらく自力ビルドせざるを得ない人はほとんどいないと思いますが、万が一の場合に参考になれば幸いです。

@ufcpp
ufcpp / Lambda.cs
Created November 26, 2017 06:41
静的メソッドをデリゲート化した場合の呼び出し負荷、思ったよりもでかかった
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
static class Lambda
{
// Roslyn 実装では、ラムダ式に対して匿名クラスが作られて、インスタンス メソッドが作られる。
// インスタンスを作る分重たそうに見えるけど、実はこの方が速い。というか静的メソッドが遅い。
public static Action Nop { get; } = () => { };
}
@not-an-aardvark
not-an-aardvark / eslint-fuzzer.js
Last active April 2, 2017 01:04
Fuzzer to detect ESLint crashes and autofixing errors
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const assert = require("assert");
const lodash = require("lodash");
const eslump = require("eslump");
const SourceCodeFixer = require("eslint/lib/util/source-code-fixer");
@littledan
littledan / tc39-pr-process-doc.md
Last active September 27, 2017 06:25
Proposed TC39 pull request process document

TC39 accepts changes through two processes--the four-stage proposal process and pull requests. Staged proposals are governed by the process document, whereas pull requests are lighter-weight, working through informal rules and conventions, as administered by the editor. This document attempts to codify a process for pull requests, mostly through writing down current practice (to help others follow along what's happening, and to help the next editor if there is a transition), but a change from current practice is included in bold.

Algorithm for getting a PR merged:

  1. If the PR is purely editorial or to support layering, tag it as 'editorial' or 'layering'.
  2. Otherwise, tag it as 'normative', as it makes an observable semantic change.
  3. If the PR is about reflecting what some web browsers' behavior is, tag it as 'web reality'.
  4. Get consensus on the PR. If this is difficult or time-consuming, mark 'needs consensus' as it is gaining consensus.
  5. If the PR is tagge
@rhysd
rhysd / foo.d.ts
Last active November 22, 2016 11:10
/// <reference types="node" />
import * as stream from 'stream';
export declare default function hogehoge(): stream.Transform;
@johnathan-sewell
johnathan-sewell / package.json
Created October 28, 2016 11:03
Example of using npm-run-all to keep NPM scripts neat
{
"name": "takeda.asagao.ui",
"version": "1.0.0",
"description": "UI libarary for Takeda websites",
"main": "index.js",
"scripts": {
"dev": "npm install && npm-run-all --parallel dev:*",
"dev:sass": "sass scss:css blocks:css --watch",
"dev:browser-sync": "browser-sync start --server --startPath /examples/index.html --files \"**/*.html\" \"**/*.razor\" \"**/*.css\" \"**/*.js\"",
"dev:browserify": "browserify examples/js/razor-block-loader.js -o examples/js/razor-block-loader.bundle.js",
@bterlson
bterlson / mod.js
Last active January 26, 2017 15:25
Module export forms have subtle differences
// exporter1.js
let foo = 1;
export { foo as default }; // exports the foo binding
foo = 2;
// exporter2.js
let foo = 1;
export default foo; // creates a new binding named *default* and initializes it to 1.
foo = 2; // assigns to the foo binding which is not exported