Skip to content

Instantly share code, notes, and snippets.

import { call, spawn } from 'redux-saga/effects'
import { sagas as centreSagas } from './ducks/centres'
export default async function rootSaga() {
const sagas = [...centreSagas]
await sagas.map(saga =>
spawn(async function () {
console.log(saga);
let isSyncError = false
class Slug < ActiveRecord::Base
slugify :override_value, :to => :slug
validates :slug, presence: true, uniqueness: true
end
@marr
marr / .rb
Last active June 9, 2017 22:04
class Slug < ActiveRecord::Base
before_validation :generate_slug
validates :slug, presence: true, uniqueness: true
private
def generate_slug
self.slug = self.value.parameterize
end
end
import { pointInPolygon } from './utils';
const Vector = (x, y) => ({ x, y });
it('detects points in polygons', () => {
const vertices = [
[1, 1],
[1, 4],
[4, 4],
[4, 1]
@marr
marr / .block
Last active August 1, 2017 23:25
Valley Fair Level 1 - Interactions
license: mit
@marr
marr / .block
Created July 18, 2017 20:15
fresh block
license: mit
@marr
marr / .block
Created July 18, 2017 20:15
fresh block
license: mit
@marr
marr / .block
Last active July 18, 2017 23:23
Valley Fair Level 1 - Interactions
license: mit
@marr
marr / .block
Last active August 1, 2017 23:37
Valley Fair - Topojson
license: mit
@marr
marr / .block
Last active August 3, 2017 00:40
fresh block
license: mit