Skip to content

Instantly share code, notes, and snippets.

@stevenkaspar
stevenkaspar / timesheet.js
Created September 8, 2017 14:36
react-big-calendar example
import React from 'react';
import services from '../services/index';
import BigCalendar from 'react-big-calendar';
import moment from 'moment';
import 'react-big-calendar/lib/css/react-big-calendar.css';
// setting to use Saturday as the first day of the week
moment.updateLocale('en-gb', {
week : {
@stevenkaspar
stevenkaspar / _cards.scss
Last active July 29, 2017 14:30
Sass Responsive Cards
/**
* - num columns per card
* - num possible column
* - include @cards > * > * as a flex item
*/
@mixin cards($card-columns: 4, $possible-columns: 12, $flex: true){
width: 100%;
display: -webkit-flex;
display: -ms-flexbox;
@stevenkaspar
stevenkaspar / gulpfile.js
Last active November 15, 2017 17:48
KeystoneJS SASS Development Gulpfile
/**
* gulp file that will restart keystonejs app and compile sass
*/
'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var shell = require('gulp-shell')
var sass = require('gulp-sass');
@stevenkaspar
stevenkaspar / flow.js
Last active June 2, 2019 03:07
VexFlow SVG Javascript Animation
var Note = function(options){
console.log(window);
this.StaveNote = new Vex.Flow.StaveNote(options);
this.removed = false;
/**
* moves the note right from its ORIGINAL position by x pixels
* (sets the trasform: translate(x) value to x)
*/
this.setOffsetX = (x) => {
if(this.removed){