Skip to content

Instantly share code, notes, and snippets.

View mrkvon's full-sized avatar
👎
github owned by microsoft

mrkvon

👎
github owned by microsoft
View GitHub Profile
@JoshuaCWebDeveloper
JoshuaCWebDeveloper / BookModel.js
Created February 28, 2020 04:13
Example for combining the redux-toolkit and redux-orm libraries
/*
* The redux-orm model and redux-toolkit slice are defined together in the same
* class.
* An export scheme similiar to Ducks is used, where the model class is
* exported in place of the reducer function.
*/
import { Model, fk, many, attr } from 'redux-orm';
import { createSlice } from '@reduxjs/toolkit';
@ronapelbaum
ronapelbaum / .travis.yml
Created May 4, 2017 05:50
How to run ESLint in you travis CI
language: node_js
node_js:
- "6"
script:
- npm run lint
- npm run build
- npm test
@JonCatmull
JonCatmull / relative-date.pipe.ts
Created December 21, 2016 10:38
Relative date Pipe for Angular2 + TypeScript . Convert date|timestamp into relative date string e.g. "5 days ago", "1 minute ago" etc.
import { Pipe, PipeTransform } from '@angular/core';
// Epochs
const epochs: any = [
['year', 31536000],
['month', 2592000],
['day', 86400],
['hour', 3600],
['minute', 60],
['second', 1]
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes