Skip to content

Instantly share code, notes, and snippets.

View nhiroki's full-sized avatar

Hiroki Nakagawa nhiroki

View GitHub Profile
@nhiroki
nhiroki / index.html
Last active February 6, 2018 13:35
Distinguish between Document and ServiceWorkerGlobalScope
<!DOCTYPE html>
<html>
<head>
<title>Hello, world!</title>
</head>
<body>
<script src="sw.js"></script>
</body>
</html>
@nhiroki
nhiroki / gist:814230e072da46fd5ca5
Last active October 22, 2015 01:35
How to build Blink/Chromium on MacOSX (as of Jan 8, 2015)

2015/01/08 時点での Blink/Chromium のチェックアウト/ビルド手順のメモ for MacOSX です。

チェックアウト/ビルド手順は頻繁に更新されているので、最新で正確な情報は本家の手順書を確認してください。この手順にしたがって生じたいかなる損害も私は責任を負いません。

xcode ぐらいはあらかじめインストールしておいてください。

チェックアウトからビルドまで

Managing HTML5 Offline Storage

HTML5 introduced many storage APIs that let you store a large amount of data locally in your users' browsers. But the amount of space allocated for each app is, by default, restricted to a few megabytes. Google Chrome lets you ask for a larger storage quota, beyond the previous limit of just 5 MB.

This document introduces you to the basic concepts around the types of storage used in Chrome and describes the experimental Quota Management API, which lets you manage your storage quota. The document assumes that you are already familiar with the general concepts of client-side storage and know how to use offline APIs.

Contents

@nhiroki
nhiroki / gist:1360905
Created November 12, 2011 18:23
BitIO
#
# BitIO utility.
#
class BitIO
include Enumerable
attr_accessor :bytepos, :bitpos
def initialize(text)
@text = text