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
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@bellbind
bellbind / convolve.js
Last active January 3, 2019 07:15
[javascript][webworker]waifu2x converter in JavaScript
var convolve = function (src2d, mat) {
"use strict";
var src = src2d.a, w = src2d.w, h = src2d.h;
var n = (mat.length - 1) / 2;
var off = n - 1;
var rw = w - 2 * n, rh = h - 2 * n;
var r = new Float32Array(rw * rh);
// [hand-optimized] to use flat matrix and remove forEach
@yudai
yudai / gist:6f8f44ac878c41eaf7dc
Last active November 7, 2023 08:35
Google v. Oracle API著作権裁判

Oracle v. GoogleのAPI著作権裁判の話

OracleとGoogleの判決文を斜め読む」を読んで裁判の経緯は理解できたものの、判決の詳細があまり理解できなかったので判決文を自分で読んだ。法律的な難しさはあまりなく、技術的な論点と関係する条文および過去の判例などが非常にわかりやすく解説されており、判決の根拠もたとえ話を交えて書かれているなど非常に読みやすい印象を受けた。

全体の内容としては比較的単純で「あらゆるプログラムのコードは著作権で保護される。ただしFair Useによる合法的な利用に関しては差し戻し審で審議せよ」という事のようだ。実は「API」という言葉は一切判決文には出てこないため、内容を良く読む必要がある。

17 U.S.C. 102(b)を巡るGoogleの主張

@voluntas
voluntas / webrtc.rst
Last active May 21, 2024 13:55
WebRTC の未来
@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
@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",
@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;
@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
@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");