Skip to content

Instantly share code, notes, and snippets.

View vnys's full-sized avatar

Victor Nystad vnys

View GitHub Profile
@vnys
vnys / sonar.css
Created April 14, 2015 09:47
Dr. Front sonar-animasjon
.df-style-breakingnews--black {
&[class*=df-fs],
[class*=df-fs] {
&::before { border-color: var(--swatch-highlights-black) }
&::after { background-color: var(--swatch-highlights-black) }
}
}
.df-style-breakingnews--white {
&[class*=df-fs],
@vnys
vnys / drfront.css
Last active August 29, 2015 14:19
Dr. Front CSS bug
@import '../legacy/legacy.css'; */
.drfront {
/* CSS Reset */
/* Default CSS */
line-height: 1;
color: black;
width: 400px;
}
@vnys
vnys / TODO.md
Last active August 29, 2015 14:18
Dr. Front
  • oa og oblad må få kopi av havis sitt abo-ikon med endret farge
  • legacy xe-ikoner for video
  • snippets
@vnys
vnys / gulp-php.js
Last active August 29, 2015 14:17 — forked from jasonrhodes/gulp-php.js
var through = require("through2");
var exec = require("child_process").exec;
// through2 docs: https://github.com/rvagg/through2
module.exports = function (options) {
// Not necessary to accept options but nice in case you add them later
options = options || {};
@vnys
vnys / remux-hop
Last active August 29, 2015 14:16 — forked from cybic/remux-hop
#!/bin/bash
#
# AutoSSH to host and create or connect to tmux session
# Multi-hop version. Separate hops with :
#
# Author: Oystein Steimler <[email protected]>
HLIST=$1;
IFS=':' read -a HOPS <<< "$HLIST"
@vnys
vnys / gist:52042c5d83098304b9aa
Last active August 29, 2015 14:16 — forked from samnang/gist:1759336
Install bash on os x
# Install Bash 4 using homebrew
brew install bash
# Or build it from source...
curl -O http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
tar xzf bash-4.3.tar.gz
cd bash-4.3
./configure --prefix=/usr/local && make && sudo make install
# Add the new shell to the list of legit shells
@vnys
vnys / example.js
Created March 4, 2015 11:41
jsonml
//<p class="txt-m">Congrats, <span class="icon icon--goldMedal" aria-hidden="true"></span> First place!</p>
[ 'p', { 'class' : 'txt-m' }, 'Congrats, ',
[ 'span', { 'class' : 'icon icon--goldMedal', 'aria-hidden' : 'true' } ],
'First place!'
]
@vnys
vnys / inline-styles.js
Last active August 29, 2015 14:15
inline styles in javascript
/*
Quick and easy way to write inline styles in js
setAttribute is not used to avoid overwriting the styles attribute if present on the element
Implies you’re inside a constructor where this.el is the element to be styled
*/
var styles = [
['width', '100%'],
['height', '100%'],
['background', 'orange']
@vnys
vnys / interop.md
Last active August 29, 2015 14:14 — forked from domenic/interop.md

module.exports = and ES6 Module Interop in Node.js

The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:

  • How can authors of function-modules convert to ES6 export syntax, without breaking consumers that do require("function-module")()?
  • How can consumers of function-modules use ES6 import syntax, while not demanding that the module author rewrites his code to ES6 export?

@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.

This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.

@vnys
vnys / 2015.01.18-2014.12.12.md
Last active August 29, 2015 14:13
askoyfk.no – google analytics

Perioden 12. desember 2014 til 18. januar 2015

  • 4146 sidevisninger fordelt på 1735 sesjoner, flest 14., 29. og 30. desember
  • 59,94% av alle besøk foretatt på mobile enheter (18,21% på tablet, 41,73% på mobil)
  • 76,1% av alle besøk endte på forsiden