Skip to content

Instantly share code, notes, and snippets.

@agektmr
agektmr / Twitter Like
Last active November 6, 2015 14:56
Copy and paste this code to your browser URL bar. (URLバーにコピペしてね)
data:text/html,<script>i=0;setInterval(function(){i=(i+100)%252000;document.querySelector('div').style.backgroundPositionX='-'+i+'px';},30);</script><div%20style="width:100px;height:100px;background:url(https://goo.gl/6nq9n5)">
@agektmr
agektmr / ws_echo_server
Created August 6, 2012 09:28
ws echo server
var WebSocket = require('ws').Server;
var ws = new WebSocket({port:8080});
var conn = [];
// Start accepting WebSocket connection
ws.on('connection', function(socket) {
// Add socket to list
conn.push(socket);
broadcast('1 peer connected.');
@agektmr
agektmr / list_of_web_music_hackathons.md
Last active August 29, 2015 14:21
List of Web Music Hackathons
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@agektmr
agektmr / Getting $promise as a result of $resource.js
Last active August 29, 2015 13:57
I'm getting $promise as a result for fetching css using $resource. Does anyone know how to resolve?
var app = angular.module('app', ['ngResource']);
app.service('fetch', ['$resource', function() {
return $resource('css/:id/:file_name', {id: '@id'}, {
'get': {
method: 'GET',
params: {
file_name: 'style.css'
}
}
}

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