Skip to content

Instantly share code, notes, and snippets.

View vnys's full-sized avatar

Victor Nystad vnys

View GitHub Profile
@vnys
vnys / draft.md
Created November 7, 2015 21:49 — forked from jsvine/draft.md
Why I love Tabletop.js but don't use it in production

Tabletop.js is a fantastic, open-source JavaScript library that lets developers easily integrate data from Google Spreadsheets into their online projects. I've used it, even contributed a minor feature, and love it for prototyping. Non-programmers love being able to update a project via Google Spreadsheets' hyper-intuitive interface.

That said, I'm extraordinarily wary of using Tabletop in production. Instead, at the Wall Street Journal, we use a bit of middleware to "prune" our Google Spreadsheets-based data and then cache it on our own servers. A few brief reasons:

@vnys
vnys / graphic.svg
Last active November 2, 2015 12:31
svg with params
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vnys
vnys / heart.svg
Last active November 2, 2015 08:40
handcoded heart svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vnys
vnys / cubic-asymmetric.svg
Last active November 1, 2015 11:23
Handcoded SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vnys
vnys / app.js
Created September 29, 2015 10:24 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@vnys
vnys / package.json
Created September 22, 2015 11:36
npm scripts for bundling and transpiling es6 modules, with babel, rollup and postcss
{
"author": "Victor Nystad",
"scripts": {
"postinstall": "./node_modules/bower/bin/bower install && npm start",
"start": "npm run watch:js & npm run watch:css & npm run serve",
"preserve": "npm run build:js & npm run build:css",
"serve": "browser-sync start --server www --server dist --server bower_components --files 'dist/*, www/*'",
"watch:js" : "chokidar 'index.js' -c 'npm run build:js'",
"watch:css" : "chokidar 'css/*.css' -c 'npm run build:css'",
"build:js": "mkdir -p dist && rollup index.js | babel -m umd --module-id fotballdataElements -o dist/test.js",
@vnys
vnys / circle.svg
Last active November 23, 2015 10:43
svg circle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vnys
vnys / 1.es6-custom-elements-intro.md
Last active February 10, 2016 20:52
es6 custom element

ES6 class syntax and custom elements with Babel

Babel's _inherits function requires the super class to be a function or null, but in Safari typeof HTMLElement is an object. Full explaination on babel/babel#1548

This solution is based on the proposed solution, but instead of rewriting HTMLElement – we just extend the function – which is safer.

@vnys
vnys / fiks.html
Last active August 29, 2015 14:20
Forskjell på fotballdata og fiks
<table class="fogisSortTable" id="fogisInfoTable">
<thead>
<tr>
<th id="thAnmaldLag" class="header headerSortDown">
Hovedlag
</th>
<th id="th1" class="header">
<nobr>Lagnavn i turn.</nobr>
</th>
<th id="thAnmaldTavlingskategori" class="header">

Max Shank sitt Kettlebell-program

Basert på supersets og aktiv hvile. Istedetfor lange pause mellom settene, hviler man ut mens man tøyer. Jeg er ikke helt der ennå, jeg tar et minutts hvile i tillegg, men det er det som er målet.

Superset 1 - 5 runder

  1. Reverse turkish getup (eventuelt tradisjonell turkish getup - en gang per side
  2. Swings - 10 repetisjoner med tung kettlebell, eventuelt 10 per arm med en lettere en
  3. Hofteleddsbøyertøying - 10 pust per side

Superset 2 - 5 runder