Skip to content

Instantly share code, notes, and snippets.

View myakura's full-sized avatar

Masataka Yakura myakura

View GitHub Profile
@myakura
myakura / 00-README-cds-2020.md
Last active January 29, 2021 12:50
Chrome Dev Summit 2020まわりの記事メモ

Chrome Dev Summit 2020まわりの記事メモ

はじめに

書いてる人:myakura (Masataka Yakura)

このgistにあるもの

Chrome Dev Summit 2020の前後でGoogleのひとが公開した記事を、やる気の続く限り読んで書いたメモ。
主にみているのは以下のサイト。

@myakura
myakura / _list_extra.scss
Last active June 30, 2018 00:54
Sass list extra functions
@charset "UTF-8";
// Sass list extra functions v0.0.1 | masataka yakura | MIT License
// determines whether an argument is a list type
// @return {boolean}
@function is-list($arg) {
@return type-of($arg) == 'list' or type-of($arg) == 'arglist';
// ISSUE: "false negative" with a single value wrapped in parens
// since "Sass doesn't use () as list delimiter characters."
@myakura
myakura / gist:bd07f58ebab07ccead81
Last active April 24, 2017 17:42
やりたいね
  • Mozillaのレポジトリにおける https://github.com/myakura/curcuma みたいなもの
    • アセット表示とか
  • Progressive AppsでTip calculatorをつくる
    • Vue.jsとかつかう?
  • 日本語の資料だけ見てC++を学ぶ
  • Preload Scannerを試すためのサーバ  - ストリームでHTMLを1行/秒とかで吐く    - 1秒ごとにウエイト入れる
{"2":"color","3":"direction","4":"display","5":"font","6":"font-family","7":"font-size","8":"font-style","9":"font-variant","10":"font-weight","11":"text-rendering","12":"webkit-font-feature-settings","13":"webkit-font-kerning","14":"webkit-font-smoothing","15":"webkit-font-variant-ligatures","16":"webkit-locale","17":"webkit-text-orientation","18":"webkit-writing-mode","19":"zoom","20":"line-height","21":"background","22":"background-attachment","23":"background-clip","24":"background-color","25":"background-image","26":"background-origin","27":"background-position","28":"background-position-x","29":"background-position-y","30":"background-repeat","31":"background-repeat-x","32":"background-repeat-y","33":"background-size","34":"border","35":"border-bottom","36":"border-bottom-color","37":"border-bottom-left-radius","38":"border-bottom-right-radius","39":"border-bottom-style","40":"border-bottom-width","41":"border-collapse","42":"border-color","43":"border-image","44":"border-image-outset","45":"border-imag
@myakura
myakura / chromeversion.js
Last active December 13, 2015 19:19
grabs data from chrome://version and reformat for "Chrome" sheet on http://goo.gl/39PQw
// open the console and run on chrome://version
// Blink (Cr28+)
function t(s){return document.querySelector(s).innerText};copy(t('#version')+'\t'+t('[i18n-content=version_modifier]')+'\t\t\t'+t('#blink_version')+'\t'+t('[i18n-content=js_version]')+'\t'+t('#flash_version')+'\t'+navigator.userAgent);
@myakura
myakura / gist:4535879
Created January 15, 2013 03:45
get Net Applications market share data
copy(Array.prototype.slice.call(document.querySelectorAll('[class^="rpt-row"] > td:last-child')).map(function (td) { return parseFloat(td.textContent.trim(), 10) }));
// http://marketshare.hitslink.com/report.aspx?qprid=3&qpaf=&qpcustom=Chrome%2025.0&qpcustomb=0&qptimeframe=M&qpsp=156&qpnp=12
@myakura
myakura / html5_content_models.md
Last active October 17, 2015 01:20
HTML5の内容モデル(むかしに書いたやつ)
@myakura
myakura / gettextalternatives.js
Created September 20, 2015 10:10
fetch HTML and return list of images along with their text alternatives.
// haven't tested yet
const jsdom = require('jsdom')
const url = process.argv[2]
jsdom.env(url, (err, window) => {
const images = Array.from(window.document.querySelectorAll('img[src]'))
const result = []
for (let i of images) {
result.push({
@myakura
myakura / gist:ca03d9b021ef38f44131
Created February 26, 2015 07:28
こんなのあるといいね
  • 画像認識で文字認識させて代替テキスト自動生成
  • Webでパイプ(?)みたいなしくみ
    • 画像をクリップするサービス→シェアするサービスみたいな、Web Intentsみたいな
  • オフラインでもオンラインでもうごく的な
@myakura
myakura / gist:d0411e73556ad4fd0f19
Created February 26, 2015 06:22
フォントもくもく会 #2でやりたいこと

unicode-range の調査

  • 使った時と使ってないときのファイルサイズの差
    • できればUnicodeの範囲を分けて計測
      • パスが多い複雑なグリフが固まってるところのがファイルサイズ大きそうと予想
  • 使ったときのHTTPリクエスト
    • 実装の中身を見てみたい

ページのテキストを取得して unicode-range を生成するコード