Skip to content

Instantly share code, notes, and snippets.

💭
📝 Writing @js-primer

azu azu

💭
📝 Writing @js-primer
Block or report user

Report or block azu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@azu
azu / electron.yml
Created Sep 17, 2019
Electron Release workflow for GitHub Actions
View electron.yml
name: Electron CD
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
@azu
azu / image-checker.js
Last active Sep 13, 2019
Validate image's binary mimetype on Node.js
View image-checker.js
const fs = require('fs');
const path = require('path');
const assert = require("assert");
const imageType = require('image-type');
const readChunk = require('read-chunk');
const isSvg = require('is-svg');
/**
* Validate image binary
* if it is ok, return undefined,
@azu
azu / deny.json
Created Aug 13, 2019
AWS/GCPで動かす場合にブロックしたいリクエスト先: https://gist.github.com/mrtc0/60ca6ba0fdfb4be0ba499c65932ab42e
View deny.json
[
"http://169.254.169.254",
"https://169.254.169.254",
"http://metadata.google.internal",
"https://metadata.google.internal",
"http://100.100.100.200",
"https://100.100.100.200"
]
@azu
azu / amp.d.ts
Last active Sep 2, 2019
TypeScript definitions for AMP Attributes. Write AMP in JSX.
View amp.d.ts
// roughish AMP attribute types for JSX/TypeScript
// Source: https://playground.amp.dev/amphtml-hint.json
// https://github.com/Microsoft/TypeScript/issues/15449
// https://stackoverflow.com/questions/50585952/typescript-and-google-amp-property-amp-img-does-not-exist-on-type-jsx-intrin
import * as React from 'react';
// why null ?
type _ANY = any;
type _ANYS = any;
declare module 'react' {
interface HTMLAttributes<T> {
@azu
azu / READ.md
Last active Aug 17, 2019
JavaScriptの本を書くときに参考にしてるもの
View READ.md

jsprimerというJavaScriptの書籍を書いている。 これを書いてるときに参考にしているものを書いていく。

ECMAScript® Language Specification

ECMAScriptのLiving Standardな仕様書ページ。 スナップショットなECMAScriptの仕様書ページもあるけど、基本的にはLiving Standardの方しか見てない。

@azu
azu / npm: package support types.user.js
Last active Jun 8, 2019
Greamonkey Scripts: detect npm package support TypeScript.
View npm: package support types.user.js
// ==UserScript==
// @name npm: package support types
// @namespace info.efcl
// @match https://www.npmjs.com/package/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
// License: MIT © azu
const NAME = "$Greasemonkey:package support types$";
const fetchPackage = (packageName) => {
@azu
azu / findAll.js
Last active Jun 8, 2019
windowのkey/valueを検索するSnnipet
View findAll.js
function __findAllName(query, isStrict){
__findAll("byName", query, isStrict);
}
function __findAllValue(query, isStrict){
__findAll("byValue", query, isStrict);
}
/*!
* Chrome JS runtime inspector plugin v0.1
* Copyright 2013 Andrei Kashcha <https://github.com/anvaka/>
* Based on Spotlight.js v1.0.0-pre <http://github.com/bestiejs/spotlight.js/>
@azu
azu / geocities:redirect-to-wayback.user.js
Last active May 30, 2019
Yahoo! ジオシティをInternet ArchiveにリダイレクトするGreasemonkey
View geocities:redirect-to-wayback.user.js
// ==UserScript==
// @name geocities:redirect-to-wayback
// @namespace info.efcl.geocities-redirect-to-wayback
// @match http://www.geocities.jp/*
// @match https://www.geocities.jp/*
// @grant none
// ==/UserScript==
// See also
// https://qiita.com/__cooper/items/5ec5453c82fd3b03d7f6
@azu
azu / 2018-2019.md
Last active Apr 6, 2019
ECMAScript Proposal Diff between 2018 - 2019.
View 2018-2019.md
@azu
azu / README.md
Last active Apr 6, 2019
2019年4月6日(土): #TC39MTG ECMAScript議事録の読書会
View README.md
You can’t perform that action at this time.