Skip to content

Instantly share code, notes, and snippets.

@caraya
caraya / fancy-tabs-demo.html
Created October 25, 2016 12:51 — forked from ebidel/fancy-tabs-demo.html
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script>
function execPolyfill() {
(function(){
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1.
/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
When I write the following fenced codeblock like this:
```jvascript
// code goes here
```
Jetpack produces the following HTML
<pre><code class="javascript">
// code goes here
@caraya
caraya / css-data.json
Last active July 12, 2017 23:33
Trying to figure out why this is not working
{
"name": "CSS",
"children": [
{
"name": "Alignment",
"children": [
{
"size": 1000,
"name": "align-content",
"url": "http://docs.webplatform.org/wiki/css/properties/align-content"
@caraya
caraya / sw.js
Created September 16, 2017 20:28
/* eslint-disable no-undef */
const PRECACHE = 'precache-v1';
const RUNTIME = 'runtime-v1';
const IMAGES = 'images-v1';
const PRECACHE_URLS = [
'./', // Alias for index.html
'styles/main.css',
'scripts/main.js',
'/offline.html'
@caraya
caraya / drive-appscript.js
Created October 16, 2017 20:03 — forked from igrigorik/drive-appscript.js
Sample BigQuery queries for the HTTP Archive dataset.
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [ {name: "Run Query", functionName: "runQuery"} ];
ss.addMenu("HTTP Archive + BigQuery", menuEntries);
}
function runQuery() {
var projectNumber = 'httparchive';
var sheet = SpreadsheetApp.getActiveSheet();
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Globalize App example using Webpack</title>
</head>
<body>
<h1>Globalize App example using Webpack</h1>

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@caraya
caraya / sw.js
Last active February 27, 2018 21:02
service worker to cache fonts
importScripts(
'https://storage.googleapis.com/workbox-cdn/releases/3.0.0-beta.0/workbox-sw.js '
);
if (workbox) {
workbox.routing.registerRoute(
/.*\.(?:woff2,woff,ttf,otf)/,
workbox.strategies.cacheFirst({
cacheName: 'font-cache',
plugins: [
@caraya
caraya / list.md
Last active March 9, 2018 04:36
list of javascript frameworks
@caraya
caraya / handlebars-wordpress-demo.markdown
Created March 30, 2018 16:23
Handlebars Wordpress Demo