Instantly share code, notes, and snippets.

View components.js
/*!
* Vue.js v2.5.17
* (c) 2014-2018 Evan You
* Released under the MIT License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";var y=Object.freeze({});function M(e){return null==e}function D(e){return null!=e}function S(e){return!0===e}function T(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function P(e){return null!==e&&"object"==typeof e}var r=Object.prototype.toString;function l(e){return"[object Object]"===r.call(e)}function i(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function t(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function F(e){var t=parseFloat(e);return isNaN(t)?e:t}function s(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var c=s("slot,component",!0),u=
View foo.js
// const render = Vue.compile('<h1>Hello {{what}}</h1>')
const HelloComponent = Vue.component('greet-component', {template: '<h1>Hello {{what}}</h1>', props: ['what']})
const app = new Vue({template: '<div><greet-component :what="name" /></div>', components: { HelloComponent }, data: {name: 'World'}})
app.$mount()
app.$children[0].$el.textContent // "Hello World"
View time.js
class DateEpoch {
constructor (epoch = {}) {
const typeCheckFinite = e => isFinite(e)
const typeCheckDate = e => 'getUTCDate' in e
switch (true) {
case typeCheckFinite(epoch):
this.epoch = toMilliseconds(parseInt(epoch))
break
case typeCheckDate(epoch):
this.epoch = epoch.getTime()
View en.json
{"welcome": "Welcome! 😊","howmany": "How many {what} do you own","hello": "Hello","userRequired": "User Name is required","userPlaceholder": "User Name","pwdRequired": "Password is required","pwdPlaceholder": "Password","captchaRequired": "Captcha is required","captchaPlaceholder": "Captcha","bravo": "😊"}
View datepicker.css
ul[data-v-0b1b89fc]{padding:0;margin:0;list-style:none}.date-picker[data-v-0b1b89fc]{position:relative;height:32px}.input-wrapper[data-v-0b1b89fc]{border:1px solid #ccc;border-radius:2px;vertical-align:middle;display:flex;justify-content:space-between;flex-flow:row nowrap;align-items:center;padding:6px 10px 6px 4px;height:32px;box-sizing:border-box}.input[data-v-0b1b89fc]{height:100%;width:100%;font-size:inherit;padding-left:4px;box-sizing:border-box;outline:none}.cancel-btn[data-v-0b1b89fc]{height:14px;width:14px}.date-panel[data-v-0b1b89fc]{position:absolute;z-index:5000;border:1px solid #eee;width:320px;padding:5px 10px 10px;box-sizing:border-box;background-color:#fff;transform:translateY(4px)}.panel-header[data-v-0b1b89fc]{display:flex;flex-flow:row nowrap;width:100%}.arrow-left[data-v-0b1b89fc],.arrow-right[data-v-0b1b89fc]{flex:1;font-size:20px;line-height:2;background-color:#fff;text-align:center;cursor:pointer}.year-range[data-v-0b1b89fc]{font-size:20px;line-height:2;flex:3;display:flex;justify-conten
View code.js
const items = [
{
value: false,
name: "Frozen Yogurt",
calories: 159,
fat: 6.0,
carbs: 24,
protein: 4.0,
iron: "1%"
},
View remote.md
View CgiFooter.vue
<template>
<div :class="[classNames]">
<a
:href="productUrl"
>
{{ productName }}
</a>
&nbsp;
&copy;
&nbsp;
View App.vue
<template>
<v-app>
<v-toolbar
fixed
clipped-left
>
<v-toolbar-side-icon
@click.stop="miniVariant = !miniVariant"
/>
<v-toolbar-title
View extractcss.js
/**
* Based on work from krasimirtsonev
*
* http://krasimirtsonev.com/blog/article/csssteal-chrome-extension-that-extracts-css
*/
// helper function for transforming
// node.children to Array
function toArray (obj, ignoreFalsy) {
var arr = [], i;