Skip to content

Instantly share code, notes, and snippets.

Avatar

Eirik Brandtzæg eirikb

View GitHub Profile
@eirikb
eirikb / main.js
Created Apr 26, 2017
MDL in Vue2 hack
View main.js
import Vue from 'vue';
import 'material-design-lite';
Vue.mixin({
mounted() {
for (const el of this.$el.querySelectorAll('[class*=mdl-js-]')) {
if (!el.dataset.upgraded) {
componentHandler.upgradeElement(el);
}
}
@eirikb
eirikb / Chart.vue
Created Apr 26, 2017
Chart.js in Vue2
View Chart.vue
<template>
<canvas ref="chart"></canvas>
</template>
<script>
import chart from 'chart.js'
export default {
props: ['options', 'data'],
@eirikb
eirikb / App.vue
Last active Jan 10, 2019
Add MDL to Vue
View App.vue
<style lang="scss">
@import "~material-design-lite/material.css";
</style>
View readme.md
npm i
npm start

Result:
Result

View vuetwo.md

vuetwo

Proof of concept library for building vue apps.
Basically a hacked together wrapper around rollup + rollup-watch with predefined setup.
vue template plugin is a slightly modified version of the new vue-template-compiler.

@eirikb
eirikb / vuetwo.md
Last active Jul 28, 2016
vuetwo - demo
View vuetwo.md

vuetwo demo

Proof of concept vue for the lazy

Usage

  1. Download zip
  2. npm install
  3. npm start
@eirikb
eirikb / demo.md
Last active Jan 28, 2017
Demo of clicktest.sh
View demo.md

#Demo

##About The demo is meant to show how to make an automated answer to a hn comment, translated from Norwegian to English with these steps:

  1. Click on Chrome address bar.
  2. Type translate.google.com and press enter.
  3. Click on input field.
  4. Type the text for translation and wait for it to translate.
@eirikb
eirikb / clicktest.md
Last active Feb 21, 2020
Automated click testing in bash
View clicktest.md

About

This is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.

Dependencies

View JSPM+AVA.md
  1. Download zip.
  2. npm install.
  3. npm test.
You can’t perform that action at this time.