Skip to content

Instantly share code, notes, and snippets.

View RuNpiXelruN's full-sized avatar

Justin Davidson RuNpiXelruN

  • Sydney, Australia
View GitHub Profile
@RuNpiXelruN
RuNpiXelruN / arrays-merge.js
Created March 5, 2019 06:16
Merge two arrays into an object
const keys = [ "height", "width" ]
const values = [ "12px", "24px" ]
const merged = values.reduce((obj, value, index) => ({...obj, [keys[index]]: value}), {})
@RuNpiXelruN
RuNpiXelruN / timer-countdown.js
Created March 5, 2019 05:37
simple JS timer countdown
timer () {
setTimeout(() => {
if (this.timeleft === 1) {
this.$router.push('/quote/offer')
return
}
this.timeleft--
this.timer()
}, 1000)
}
var gulp = require('gulp'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
browserSync = require('browser-sync').create();
gulp.task('serve', ['sass'], function() {
browserSync.init({