Skip to content

Instantly share code, notes, and snippets.

View ashumeow's full-sized avatar
🎯
Moving Forward

Aswini S ashumeow

🎯
Moving Forward
View GitHub Profile
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}

ServiceWorkerハッカソンにて

自己紹介

@mizchi です

今日のコンセプト

  • Isormorphic Web Application Framework
  • serviceworker内にexpress(nodeのwaf)いてほしくない…?
@ashumeow
ashumeow / result.txt
Last active August 29, 2015 14:18 — forked from vvakame/result.txt
self#key string
self#caches object
self#clients object
self#registration object
self#onactivate object
self#oninstall object
self#onmessage object
self#fetch function
self#close function
self#skipWaiting function
using UnityEngine;
using UnityEditor;
namespace CatchCo.EditorScripts.Util
{
public class SetMaterialWithSpriteEditorWindow : EditorWindow
{
private Material _material;
private bool _needsPositionUpdated;
@ashumeow
ashumeow / readme.md
Last active August 29, 2015 14:16 — forked from paulirish/readme.md

console.log wrap resolving for your wrapped console logs

I've heard this before:

What I really get frustrated by is that I cannot wrap console.* and preserve line numbers

We enabled this in Chrome DevTools via blackboxing a bit ago.

If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. Click, and the full source is looking longingly into your eyes.

@ashumeow
ashumeow / Readme.md
Last active August 29, 2015 14:14 — forked from aemkei/Readme.md
@ashumeow
ashumeow / index.html
Last active August 29, 2015 14:14 — forked from p01/index.html
<!doctype html>
<html>
<head>
<title>JS1k 2015 Invitation by Mathieu 'p01' Henri</title>
<meta charset="utf-8" />
<meta name="author" content="Mathieu 'p01' Henri, @p01"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<style>
html, body { margin: 0; padding: 0; border: 0; }
#c { display: block; } /* kill scrollbars from hell */
@ashumeow
ashumeow / query.sql
Last active August 29, 2015 14:14 — forked from igrigorik/query.sql
SELECT * FROM
(SELECT 'desktop' type,
NTH(50, quantiles(bytesCSS)) median,
NTH(75, quantiles(bytesCSS)) seventy_fifth,
NTH(90, quantiles(bytesCSS)) ninetieth
FROM [httparchive:runs.latest_pages]),
(SELECT 'mobile' type,
NTH(50, quantiles(bytesCSS)) median,
NTH(75, quantiles(bytesCSS)) seventy_fifth,
NTH(90, quantiles(bytesCSS)) ninetieth

What are we trying to observe? Raw object data.

// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
 
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];

RegExp.escape(string)

Computes a new version of a String value in which certain characters have been escaped, so that the regular expression engine will interpret any metacharacters that it may contain as character literals.

When the escape function is called with one argument string, the following steps are taken:

  1. Let string be ToString(string).
  2. ReturnIfAbrupt(string).
  3. Let length be the number of characters in string.
  4. Let R be the empty string.