Skip to content

Instantly share code, notes, and snippets.

View syoichi's full-sized avatar

Syoichi Tsuyuhara syoichi

View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active April 19, 2025 04:59
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@voluntas
voluntas / webrtc.rst
Last active January 13, 2025 22:40
WebRTC の未来
anonymous
anonymous / real-world-electron.md
Created August 22, 2015 14:48

Real World Electron Development

~ Case of the Kobito, Markdown Editor for YAPC Hackathon!

@mizchi / Koutaro Chikuba, Increments

About

  • Node.js / Frontend Engineer
@azu
azu / Incremental DOM.md
Last active July 13, 2022 16:07
Incremental DOM ざっと見たやつ。追記: 初期バージョンのコードなので最新では異なる場合があります。

Incremental DOM

Introducing Incremental DOM — Google Developers — Medium

Reactやvirtual-dom、Glimmer(Ember)などVirtual DOMの実装は色々あるが、これらのVirtual DOM実装には2つの問題がある

  • 既存のテンプレート言語を利用していない(しにくい)
  • モバイルでのパフォーマンス、特にメモリに関しては大きすぎる

これらを解決するためにIncremental DOMと言うものを作っている(WIP)

// ==UserScript==
// @name gunosy redirect
// @namespace gifnksm.hatenablog.jp
// @include https://gunosy.com/articles/*
// @version 1.0.2
// @grant none
// @downloadURL https://gist.github.com/gifnksm/cc0ae271dab4b31036d1/raw/gunosy_redirect.user.js
// @author NAKASHIMA, Makoto <[email protected]>
// ==/UserScript==
@ailispaw
ailispaw / patch.fix.twitter.upload.tbrl.js
Last active January 6, 2020 13:10
Fix Twitter.upload 2016.08
// ==Taberareloo==
// {
// "name" : "Fix Twitter.upload 2016.08"
// , "description" : "Fix Twitter.upload 2016.08"
// , "include" : ["background"]
// , "version" : "0.3.1"
// , "downloadURL" : "https://gist.githubusercontent.com/ailispaw/f0cf8e6db802b51a9790/raw/patch.fix.twitter.upload.tbrl.js"
// }
// ==/Taberareloo==
@takahashim
takahashim / aozora-api.md
Last active March 7, 2021 13:31
青空文庫のAPI化についての資料

青空文庫のAPI化についての資料

勝手にまとめているものです。随時更新中(last update: 2015/05/26)

3行まとめ

  • 現状、公式の「青空文庫API(サーバ)」はなさそう
  • 公式サイトでは作品データのCSVを配布している
  • このCSV等を使った「野良APIサーバ」の試みはあった(今もある)
@danielgtaylor
danielgtaylor / gist:0b60c2ed1f069f118562
Last active March 12, 2025 04:26
Moving to ES6 from CoffeeScript

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.

Punctuation

Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

@ZipFile
ZipFile / Pixiv Public API.yaml
Last active August 7, 2022 14:11
Unofficial API specification extracted from Pixiv Android App
swagger: "2.0"
info:
title: "Pixiv Public API"
description: "Unofficial API specification extracted from Pixiv Android App v4.8.2"
version: "1.0"
host: public-api.secure.pixiv.net
schemes:
- https
basePath: /v1
produces:
@ailispaw
ailispaw / patch.extractor.youtube.extract.tbrl.js
Last active January 6, 2020 13:10
Fix extractor for YouTube
// ==Taberareloo==
// {
// "name" : "Fix extractor for YouTube"
// , "description" : "Fix extractor for YouTube"
// , "include" : ["content"]
// , "match" : ["*://*.youtube.com/watch*"]
// , "version" : "0.2.0"
// , "downloadURL" : "https://gist.githubusercontent.com/ailispaw/0b8eef48ffa07a9ef56a/raw/patch.extractor.youtube.extract.tbrl.js"
// }
// ==/Taberareloo==