Skip to content

Instantly share code, notes, and snippets.

View latest.log.css
/* <system section="theme" selected="alpha2"> */
@import "/css/theme/alpha2/alpha2.css";
/* </system> */
/* <system section="background" selected="default"> */
/* default */
/* </system> */
/*aside { outline: 2px solid yellow }*/
#container { width: 1250px; /*outline: 2px solid red*/ }
@uupaa
uupaa / msgpack.2.0alpha.js
Created Nov 18, 2012
msgpack.2.0alpha.js
View msgpack.2.0alpha.js
/*!{id:"msgpack.js",ver:"2.0alpha",license:"MIT",author:"uupaa.js@gmail.com"}*/
(function(global) { // @arg Global: window or global
// --- header ----------------------------------------------
global.msgpack = {
pack: msgpack_pack, // msgpack.pack(mix:Mix,
// size:Integer = 16Kb):Uint8Array
unpack: msgpack_unpack // msgpack.unpack(view:Uint8Array):Mix
};
@uupaa
uupaa / localStorageWithByteArray.html
Created Nov 26, 2012
localStorage with ByteArray
View localStorageWithByteArray.html
<!DOCTYPE html><html><head><meta charset="utf-8">
<script>
window.onload = function() {
// localStorage に対するバイナリ文字列のデータ読み書きテスト
// MobileSafari, AndroidBrowserでは、電源OFF -> ON でデータが消失する
if (0) {
// null(0x00) を含まない文字列データ
if (!localStorage.getItem("dummy")) {
localStorage.setItem("dummy", "dummy");
@uupaa
uupaa / convert_UTF16_to_UTF8
Created Dec 1, 2012
RFC3629 - UTF-8, a transformation format of ISO 10646
View convert_UTF16_to_UTF8
// RFC3629 - UTF-8, a transformation format of ISO 10646 -
// +------+-----------+-------------------------------------+-----------+-----------+-----------+-----------+
// | Rule | UTF-16 | Representation | UTF-8 1st | UTF-8 2nd | UTF-8 3rd | UTF-8 4th |
// +------+-----------+-------------------------------------+-----------+-----------+-----------+-----------+
// | [1] | | 00000000 0zzzzzzz | 0zzz zzzz | | | |
// | | +-------------------------------------+ | | | |
// | | 0x000000~ | 00000000 00000000 | 0000 0000 | | | | (0x00)~
// | | 0x00007F | 00000000 01111111 | 0111 1111 | | | | (0x7F)
// +------+-----------+-------------------------------------+-----------+-----------+-----------+-----------+
// | [2] | | 00000yyy yyzzzzzz | 110y yyy
@uupaa
uupaa / tap_tap.htm
Created Dec 5, 2012
tap/click time logger
View tap_tap.htm
<!DOCTYPE html><html><head><meta charset="utf-8">
<script>
window.onload = function() {
var lastTouchEnd = 0; // last touchend time
document.body.addEventListener("mousedown", touchstart, false);
document.body.addEventListener("mouseup", touchend, false);
document.body.addEventListener("touchstart", touchstart, false);
document.body.addEventListener("touchend", touchend, false);
View data uri test
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<script src="a.js"></script>
<img src="data:image/jpeg;base64,%2F9j%2F4AAQSkZJRgABAQEASABIAAD%2F4QCARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAKgAgAEAAAAAQAAAICgAwAEAAAAAQAAAIAAAAAA%2F9sAQwAHBQUGBQQHBgYGCAcHCAoRCwoJCQoVDxAMERkWGhoYFhgXGx8nIRsdJR0XGCIuIiUoKiwsLBohMDMwKzMnKywq%2F9sAQwEHCAgKCQoUCwsUKhwYHCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq%2F8AAEQgAgACAAwEiAAIRAQMRAf%2FEAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC%2F%2FEALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29%2Fj5%2Bv%2FEAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC%2F%2FEALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdH
@uupaa
uupaa / caniuse.md
Last active Dec 10, 2015
can i use...
View caniuse.md

document.head

  • iOS 4.3.5: ok
  • Android 2.2.1: ok
  • Chrome 4: ok
  • Firefox 4: ok
  • Opera 11: ok
  • Safari 5: ok
  • IE 9: ok
  • IE 8: ng
  • polyfill:
@uupaa
uupaa / Heroku setup memo
Last active Dec 10, 2015
Heroku setup memo
View Heroku setup memo
- sing up
- install Heroku toolbelt
https://toolbelt.heroku.com/
%> heroku version
heroku-toolbelt/2.33.5 (x86_64-darwin10.8.0) ruby/1.9.3
%> heroku login
Enter your Heroku credentials.
@uupaa
uupaa / HTML5FunctionsSQLiteDBPath.txt
Created Jan 31, 2013
HTML5 Functions SQLite.db path. WebStorage(LocalStorage), WebSQL, Application Cache, IndexedDB
View HTML5FunctionsSQLiteDBPath.txt
MobileSafari:
Application Cache:
?
WebSQL:
/var/mobile/Library/WebKit/Databases/
WebStorage:
/var/mobile/Library/WebKit/LocalStorage/
IndexedDB:
?
@uupaa
uupaa / debugging Chrome for Android.md
Last active Dec 12, 2015
debugging Chrome for Android
View debugging Chrome for Android.md
  • download and install android sdk

    • /Applications/android-sdk
  • add PATH

    • ~/dotfiles/.zshrc
      • PATH="$PATH:/Applications/android-sdk/platform-tools"
  • apply

    • $ source ~/dotfiles/.zshrc
You can’t perform that action at this time.