Skip to content

Instantly share code, notes, and snippets.

View kjj6198's full-sized avatar
💻
Tech always win

Kalan kjj6198

💻
Tech always win
View GitHub Profile
@martypdx
martypdx / README.md
Last active December 17, 2021 17:19
AoT Template Extraction

AoT Template Extraction

Rather than creating DOM nodes in JavaScript, an AoT system can extract the html, deliver as html, and then only need reference the relevant DOM nodes in JavaScript. This has a number of performance benefits:

  1. It takes advantage of fast parsing of html by the browser and avoids the additional JavaScript bundle size and parsing tax.
  2. Only elements involved in binding need to be managed or even referenced
  3. Faster mechanisms like cloneNode can be used to produce cheaper copies
  4. Like html templates can be consolidated

Based on the current Svelte 3.0 output, it seems well poised to take advantage of this.

@bendc
bendc / raf-boilerplate.js
Created August 28, 2017 13:52
rAF tutorial: boilerplate code
"use strict";
// animation utils
// ===============
const trackTime = id => {
const [entry] = performance.getEntriesByName(id);
if (!entry) {
performance.mark(id);
@Rich-Harris
Rich-Harris / service-workers.md
Last active August 7, 2026 09:39
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@kjj6198
kjj6198 / rails-102.md
Last active August 29, 2015 14:26 — forked from xdite/rails-102.md

專案名稱: Rails新手村網站

主旨:收集 Rails 有用 Link

基本功能

@matsubo
matsubo / credit_card_bin_codes.md
Last active November 13, 2026 02:48
Credit Card Bin Codes

概要

クレジットカード番号には法則があり、先頭6桁でカードの種類を識別、分類することができる。

詳細はISO/IEC 7812で規定されている。

ISO/IEC 7812 - Wikipedia https://ja.wikipedia.org/wiki/ISO/IEC_7812

先頭の6桁を銀行識別番号(Bank Identification Number、略称:BIN)ないしは発行者識別番号(Issuer Identification Number、略称:IIN)と呼び、この先頭6桁でカード発行会社(イシュア、issuer)が判るようになっている。